我正在處理這段代碼,我正在使用一個簡單的插入語句,我無法弄清楚爲什麼它不工作。如果有人能看到我做錯了,請告訴我。謝謝! 這是我收到的錯誤:簡單的插入語句的問題
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 'long,comments)
VALUES (2 ,2012-11-18 21:25:30, 39.3436984, -76.5856958, hh)' at line 1
這裏是代碼:
mysql_query ("INSERT INTO incidents (emergency_type,date_time,lat,long,comments)
VALUES (2 ,$catchDate, $catchLat, $catchLong, $catchDescription)") or die(mysql_error());
echo"<br /> Data inserted";
就是這樣,感謝勞倫斯! – codenamejupiterx