PHP error Warning:mysql_query () workaround, Warningmysql_query
PHP prompt Error: warning:mysql_query () [Function.mysql-query]: Access denied for user ' ODBC ' @ ' localhost ' (using Password:no)
Code:
Reason:
Mysqlclass the second beginning of the Mysqlclass, first the first to make the same $this->link, and then call the __CONSTRUCT function will shut down this->link.
Finally, the MySQL resource in $db is empty and the error pops up.
Workaround:
$db = $db? $db: New Mysqlclass ();
Or
$this->link=mysql_connect ($host, $user, $PW, true);
Hope to provide a solution that can really help everyone.
http://www.bkjia.com/PHPjc/1063894.html www.bkjia.com true http://www.bkjia.com/PHPjc/1063894.html techarticle PHP Error Warning:mysql_query () workaround, warningmysql_query PHP hint error: warning:mysql_query () [Function.mysql-query]: Access denied for user ' ODBC ' @ ' localhost ' (using P ...