$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
}
爲什麼這不起作用?這讓我瘋狂。在PHP中使用mySQL_num_rows時遇到困難
ERROR Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
所有的拼寫,語法,句法,而且情況是正確的。網址正在通過$i_id
變量。它正確地回顯出來。
我在做什麼錯?
哇,謝謝你的收穫! – fyz 2012-07-21 18:16:12