Rommeo Posted December 26, 2010 Share Posted December 26, 2010 I have 'pages' table; id | mypageid |content | etc.. 1 | contact | e mail me | ... my query is : <?php $query = "SELECT * FROM pages WHERE mypageid = '$mypageid'"; $result = mysql_query($query) || die(mysql_error()); $total = mysql_num_rows($result); ?> I m always getting this error message : Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in What's wrong with my query ? Quote Link to comment https://forums.phpfreaks.com/topic/222693-whats-wrong-with-my-query/ Share on other sites More sharing options...
Pikachu2000 Posted December 26, 2010 Share Posted December 26, 2010 See if using this line instead of yours changes anything. $result = mysql_query($query) or die( "<br>Query string: $query<br>Produced error: " . mysql_error() ); Quote Link to comment https://forums.phpfreaks.com/topic/222693-whats-wrong-with-my-query/#findComment-1151636 Share on other sites More sharing options...
Rommeo Posted December 26, 2010 Author Share Posted December 26, 2010 Thank you Quote Link to comment https://forums.phpfreaks.com/topic/222693-whats-wrong-with-my-query/#findComment-1151642 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.