php提示错误:Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO)
代码:
- <?php
- class mysqlClass
- {
- function mysqlClass($host='localhost',$user='root',$pw='',$db='mysql')
- {
- $this->link=mysql_connect($host,$user,$pw);
- mysql_select_db($db);
- }
- function query($sql){
- mysql_query($sql);
- }
- function __destruct(){
- mysql_close($this->link); //multi construct will cause error
- }
- // liehuo,net
- }
- $db=new mysqlClass();
- $db=new mysqlClass();
- $db->query("select * from user");
新闻热点
疑难解答