当前位置:首页 > PHP教程 > PHP总结归纳

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

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旁边的反引号` ?(选用英文输入法),而?不是'??单引号

.syntaxhighlighter{padding-top:20px;padding-bottom:20px;}

【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!