Nodejs 操作Mysql 莫名其妙报错

Nodejs 操作Mysql 是语句正确但莫名其妙报错主要原因是空格

注意:Nodejs操作Mysql 需要将字段名和变量值紧贴在一块不然会报错

{
  code: 'ER_PARSE_ERROR',
  errno: 1064,
  sqlMessage: "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 ' = '1662009099208'' at line 1",
  sqlState: '42000',
  index: 0,
  sql: "UPDATE `xxxx` SET `reply` = 'replyreplyreply' WHERE `id` = '16629208' "
}
50 Views
分享你的喜爱
linwute
linwute

我要像梦一样自由,像大地一样宽容;
在艰辛放逐的路上,点亮生命的光芒;
我要像梦一样自由,像天空一样坚强;
在曲折蜿蜒的路上,体验生命的意义;

留下评论

您的电子邮箱地址不会被公开。