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 ? 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() ); 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 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
Archived
This topic is now archived and is closed to further replies.