我開始在一個Mysql查詢上工作,它會一直出現一個錯誤?Mysql「where」and「or」statement
有人可以看看它,並告訴我我做錯了什麼?
$query = ("select * from `users` where (`username`='$username' and `password`='$password' or select * from `users` where `$username `='$email' and `password`='$password')");
誤差
mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a8423624/public_html/testchecklogin.php on line 57
,這意味着它並沒有發現任何人。這意味着我的查詢是錯誤的?
顯示SQL不足以解決PHP錯誤。 –
你可以在這裏輸入錯誤字符串嗎? mysql_error()返回錯誤。 – Headshota