ERROR: Could not able to execute
INSERT INTO ms(group, rollno , obtmarks , totalmarks, board, passyear, division)VALUES('Science' , '6787' , '723' , '1100' , 'islambad' , '2012' , '1st')
. You have an error in your SQL syntax; check the manual that corresponds to your harisDB server version for the right syntax to usenear 'group, rollno , obtmarks , totalmarks, board, passyear, division)VALUES('S' at line 1!
數據不能插入表格(PHP)
0
A
回答
0
INSERT INTO ms(groups, rollno , obtmarks , totalmarks, board, passyear, division)VALUES('Science' , '6787', '723', '1100', 'islambad', '2012', '1st');
請嘗試上面的查詢。而不是組將列名更改爲組並嘗試它。
0
試試這個:
INSERT INTO ms(groups, rollno, obtmarks, totalmarks, board, passyear, division) VALUES('Science', '6787', '723', '1100', 'islambad', '2012', '1st');
0
正如指出的group
是一個保留字,兩種解決方案,加回蜱一輪的名字 -
INSERT INTO ms(`group`, rollno , obtmarks , totalmarks, board, passyear, division) VALUES ('Science' , '6787' , '723' , '1100' , 'islambad' , '2012' , '1st')
(也注意多餘的空格輪VALUES
幫助)。
或重命名該列。
另外提醒您應該使用預處理語句並綁定變量,因爲這通常更安全和更安全。
0
它的正常工作
無需更改任何列名只需更換下面的查詢。
INSERT INTO ms(`groups`, rollno , obtmarks , totalmarks, board, passyear, division)VALUES('Science' , '6787', '723', '1100', 'islambad', '2012', '1st');
如果有任何其他查詢讓我知道。
我希望這是有幫助的。
謝謝。
相關問題
- 1. php mysql表格沒有插入數據
- 2. Html表格:插入數據
- 3. 插入表格數據
- 4. 從表格插入數據
- 5. php插入數據到表
- 6. php mysql不插入數據
- 7. 不能使用表格適配器插入數據
- 8. 不能在mysql數據庫中插入數據使用php
- 9. PHP:數據可以發佈,但不能插入到數據庫
- 10. PHP註冊表格沒有插入憑據到數據庫中
- 11. 不能用php將數據插入到mysql數據庫中的現有表中
- 12. 插入表格時不能使用符號(php/sql)
- 13. php Mysql插入:不能再插入
- 14. 從數據庫插入數據到Word根據表格格
- 15. html表單,PHP插入數據到數據庫不工作?
- 16. 插入表格插入表
- 17. PHP7-MariaDB插入數據表格
- 18. 從asp.net插入數據到SQL表格
- 19. 試圖從PDO插入數據表格
- 20. ABL插入和顯示錶格數據
- 21. 在WordPress數據庫中插入表格
- 22. 如何在表格中插入數據
- 23. 在asp.net中插入數據sqlce表格
- 24. 從表格中插入數據
- 25. Python燒瓶從表格插入數據
- 26. 爲什麼我的php函數不能插入數據庫?
- 27. 插入查詢不會插入數據到mysql數據庫表
- 28. 在表格中輸入的數據不會在表格中獲得插入
- 29. 通過PHP將表格值插入到數據庫中
- 30. 如何從PHP表格執行數據庫插入
需要查看php代碼。 –
給我看你的表格結構並插入php代碼 – Jok3r
group是mysql中的一個保留字。爲列而不是組使用其他名稱。 –