這行代碼語法錯誤(MySQL和PHP)
$SQL = "SELECT * FROM stats ORDER BY Team WHERE Team='$teamval'";
與下面的MySQL錯誤返回:
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'WHERE Team='OTT''
at line 1
我找不到任何錯誤的語法,這有什麼錯它?
[這是從其手冊中有關'SELECT'語句語法]的相關MySQL文檔(http://dev.mysql.com/doc/refman/5.7/ EN/select.html)。 – 2014-05-08 19:43:43