forumnz Posted June 6, 2008 Share Posted June 6, 2008 I dont see what is wrong with this: <? $con = mysql_connect("localhost","aaaaa","aaaaa"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("aaaaa", $con); $result = mysql_query("SELECT * FROM accepted WHERE bid='$wdid' AND reqid='$rid"); $num_rows = mysql_num_rows($result); echo $num_rows; ?> I get this error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /usr/local/www/vhosts/sitequote.co.nz/httpdocs/Members/ViewRequest.php on line 76 Thanks! Link to comment https://forums.phpfreaks.com/topic/109066-mysql_num_rows-help/ Share on other sites More sharing options...
raku Posted June 6, 2008 Share Posted June 6, 2008 Your query is failing. $wdid and $rid weren't set. Link to comment https://forums.phpfreaks.com/topic/109066-mysql_num_rows-help/#findComment-559527 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.