Home  >  Article  >  Database  >  mySQL字段中包含关键字的插入有关问题

mySQL字段中包含关键字的插入有关问题

WBOY
WBOYOriginal
2016-06-07 16:23:551178browse

mySQL字段中包含关键字的插入问题 表 tb_system_help2中包含关键字字段order 插入时会报错。 INSERT INTO tb_system_help2(sysid,sysname,helpid,helpname,parentid,isLeaf,order) VALUES(?,?,?,?,?,?,?) ?解决办法: INSERT INTO tb_system_help2(sysid,sysn

mySQL字段中包含关键字的插入问题

tb_system_help2中包含关键字字段order 插入时会报错。

INSERT INTO tb_system_help2(sysid,sysname,helpid,helpname,parentid,isLeaf,order) VALUES(?,?,?,?,?,?,?)

?解决办法:

INSERT INTO tb_system_help2(sysid,sysname,helpid,helpname,parentid,isLeaf,`order`) VALUES(?,?,?,?,?,?,?)

?

改成?`order`?,注意是数字键1旁边的反引号` ?(选用英文输入法),而?不是'??单引号

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn