1064 - 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 'from,to,msg,date,`status`)
错误的sql语句
INSERT INTO message(from,to,msg,date,`status`)
VALUES ( 10, 100, '111', '2019-04-17 11:04:24', 0);
这个错误其实很低级,就是表中列名和mysql保留的关键字冲突了。
看sql语句咋看咋对,还有from这么明显的关键字吗!
这个时候需要加上 ``
INSERT INTO message(`from`,`to`,msg,date,`status`)
VALUES ( 10, 100, '111', '2019-04-17 11:04:24', 0);