Hi guys,
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:
PHP Code:
82 $query = "SELECT * FROM 'members'";
83 $result = mysql_query($query);
84 $num_results = mysql_num_rows($result);
85
86 for ($i=0; $i <$num_results; $i++)
87 {
88 $row = mysql_fetch_array($result);
89 echo '<br /> ';
90 echo stripslashed($row['company']);
91 }
Any help would be much appriciated
Regards
Pete