Hi,
I am getting an error:
Warning: Supplied argument is not a valid MySQL result resource in /home/sites/site108/web/shopping/view.php on line 28
When the following code is accessed:
###############################
# Connect to the MySQL server #
$connection = @mysql_connect("217.158.42.18", "####", "####");
if (!$connection) {
echo "Fatal Error!<br>Connection Failed!<br><br>";
echo mysql_error();
exit();
}
#####################
# Test the database #
if (!@mysql_select_db("amazing")) {
echo "Fatal Error!<br>Database Selection Failed!<br><br>";
echo mysql_error();
exit();
}
###################
# The MySQL query #
$myquery = @mysql_query("SELECT * FROM 'fb-vendors' WHERE id = '$id'");
$data = mysql_fetch_array($myquery);
(the line it is complaining about is the last line above)
Now this is strange, because I have the exact same code on two different web sites that are hosted on the same machine and they are not causing errors.
Any suggestions?
Thanks!