Excuse me for the silly (I guess) topic, but I'm stuck. I'm trying to pull some data from a table with the following code and it keeps telling me "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in W:\www\elis\includes\userrights.php on line 8". PLEASE help!
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
$queryresult = mysql_query($query, $connection) or die(mysql_error());
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
$queryresult = mysql_query($query, $connection) or die(mysql_error());
Thanks for the support, here is what i get:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM userrights WHERE (userid = '1') AND (fieldid = '1')' at line 1
The names of the DB fields and table are ten times checked ....
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.