Warning: mysql_num_rows():
Posted: Sun Mar 04, 2007 11:47 pm
Why am I getting this, and how do I fix it?
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in server/address/index.php on line 310
Code: Select all
// check to see if this person is in the DB
$query = "SELECT * FROM table WHERE first_name='".pnVarPrepForStore($first_name)."', last_name='".pnVarPrepForStore($last_name)."', reg_year='".pnVarPrepForStore($reg_year)."'";
$result = mysql_query($query);
$numrows = mysql_num_rows($result);
if($numrows == 0)
{
// do something
}