我一直在嘗試使用不同格式的查詢,但我不知道爲什麼會出現這個奇怪的錯誤。儘管編寫了正確的查詢,仍然拋出了MySql語法錯誤
insert into details ('refno','membershipno','name','dob','year_of_passing_diploma','phone','address','email','mobileno','city','state','pincode','degree','college') values('1001','2001','ragesh','1991-06-27','2012','24423021','D1, silver star apartments sec','[email protected]','9840526989','chennai','tamil nadu','600020','pilot','newzeleand','98455 27/06/14','IOB chennai','Chetta kadai','nandanam','leatrher','MD','3','24405158','chennai')
我沒有發現任何錯誤在此查詢還是我收到錯誤
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 ''refno','membershipno','name','dob','year_of_passing_diploma','phone','address',' at line 1
任何人都經歷了同樣的問題?
查詢是不正確的,你用'''而不是反引號來引用你的字段名稱。 – 2014-09-06 15:30:48
我投票結束這些問題爲一個簡單的印刷錯誤。 – 2014-09-06 15:34:39
其實它的一個查詢,我的代碼已編寫..我正在查看邏輯..我是如此愚蠢,我不看看列和相應的值! – 2014-09-06 15:38:04