$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
}
为什么这不起作用?它快把我逼疯了。
错误
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
所有拼写、语法、句法和大小写都是正确的。URL 正在传递$i_id
变量。它的回声正确。
我究竟做错了什么?