$i_id = $_GET['iiSL'];
require_once('../include/dbc.php');
$sql = "SELECT invite_id FROM invite_requests WHERE invite_id = '$i_id'";
$result = mysql_query($sql);
if(mysql_num_rows($result == 1))
{
echo 'GOOD ID EXISTS';
//ECHO IS JUST TO TEST
}
else
{
echo 'BAD ID IS NOT IN DB';
//ECHO IS JUST TO TEST
}
Why is this not working? It’s driving me insane.
ERROR
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
All spelling, grammar, syntax, and case is correct. URL is passing the $i_id variable. It echo’s out correctly.
What am I doing wrong?
There is a typo in the condition..try this..
You are passing result of
$result == 1tomysql_num_rowswhich expects a result resouce ofmysql_query()..:)