Hello...I have the following query to the database to bring back all of the rows in the MEMBERS table (currently only 3)
<?
$dbh=mysql_connect ("localhost", "username", "password") or
die ('I cannot connect to the database.');
mysql_select_db("mydb");
$query = "select * from MEMBERS";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
?>
when I access the page I get the following error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in db_connect.inc on line 9
The thing is that I have the exact code working elsewhere (on another server) Do you see any issue with my syntax? Cannot determine the problem...