1
我正在使用我的網站上的用戶之間的私人消息系統。這裏是我的查詢:無法找出mySQL語法錯誤的來源
$query = "INSERT INTO messages (to, `from`, message) VALUES ('{$user}', '{$username}', '{$message}')";
不過,我得到這個錯誤:
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 'to, `from`, message) VALUES ('Cheezey', 'Cheezey', 'Enter your message here')' at line 1
我有一種揮之不去的感覺,這是我的一個非常愚蠢的錯誤,但我似乎無法弄清楚。
謝謝,我不知道它是。當SO會讓我接受你的回答。 – Cheezey