小蜜锋 - 云代码空间
—— 技术宅拯救世界!
UPDATE `cns_rob` SET `left`=left-1 WHERE ( `id` = 1 ) AND ( `status` = 1 );这句sql提示错误
[Err] 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 '-1 WHERE ( `id` = 1 ) AND ( `status` = 1 )' at line 1原因是left是保留字,数据库表字段left改成remain后成功了