Possible Duplicate:
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource
Im getting this error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/u391124286/public_html/options.php on line 7
My code is
<?php
$con=mysql_connect("localhost","root","pass");
mysql_select_db("my_db");
$query=mysql_query("SELECT * FROM Options where
Option='Map' AND
Toggle='1'");
$count=mysql_num_rows($query);
if($count==1){
$Map='1';
}
else
{
$Map='0';
}
?>
i dont understand why this error is occuring, i am fairly new to php so it is probably something simple.