check the manual that corresponds to your MySQL server version for the right syntax to use near ‘order(id,uid,money,status,‘time’,aid) values (‘20201204180426318’,12,24.00,‘1’,’’ at line 1 Query: insert into order(id,uid,money,status,‘time’,aid) values (?,?,?,?,?,?) Parameters: [20201204180426318, 12, 24.00, 1, Fri Dec 04 18:04:26 CST 2020, 4533]
在跟着网络上的教程做一个商城小项目的时候,发现加入订单的时候报了这个错误,在网上搜索了一下 发现是表名用了mysql的关键字,把order表名改了之后就好了。
以后切记关键字。
参考:
https://blog.csdn.net/hello__word__/article/details/76287062?ops_request_misc=%25257B%252522request%25255Fid%252522%25253A%252522160707637719724838582252%252522%25252C%252522scm%252522%25253A%25252220140713.130102334…%252522%25257D&request_id=160707637719724838582252&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allbaidu_landing_v2~default-2-76287062.nonecase&utm_term=check%20the%20manual%20that%20corresponds%20to%20your%20MySQL%20server%20version%20for%20the%20right%20syntax%20to%20use