可能重複:
mysql_num_rows(): supplied argument is not a valid MySQL result resource爲什麼此SQL查詢引發警告?
$resultnx = mysql_query("SELECT * FROM `emails` WHERE `email` = '{$email}'");
$num_rows = mysql_num_rows($resultnx);
得到這個警告警告:mysql_num_rows():提供的參數不是一個有效的MySQL結果資源中....
我應該提一下,先前的代碼在數據庫中至少放置了1個實例。它應該幫助我檢查重複。 – user355367 2010-06-01 12:02:14
此代碼似乎易受SQL注入攻擊。改用準備好的語句。 – Tgr 2010-06-01 12:32:42