I am fairly new to PHP and mySQL and am still learning the ropes.
I am getting the following error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/i4visua/public_html/cmsadmin/editmembers.php on line 84
the purpose of the script is to show the just the names of all the companies in the database using a loop.
My code is as follows:
82 $query = "SELECT * FROM 'members'";
83 $result = mysql_query($query);
84 $num_results = mysql_num_rows($result);
86 for ($i=0; $i <$num_results; $i++)
88 $row = mysql_fetch_array($result);
89 echo '<br /> ';
90 echo stripslashed($row['company']);
Any help would be much appriciated