i4VisualMedia Posted December 14, 2006 Share Posted December 14, 2006 Hi guys,Im quite new to working with 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 84from this 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 } can anybody help?cheersPete Quote Link to comment https://forums.phpfreaks.com/topic/30632-warning-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result-resourc/ Share on other sites More sharing options...
Zane Posted December 14, 2006 Share Posted December 14, 2006 use backticks instead of quotes for column names or tablesthe backtick is to the left of the 1 keySELECT * FROM `members` Quote Link to comment https://forums.phpfreaks.com/topic/30632-warning-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result-resourc/#findComment-141080 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.