<分区>
我创建了一个包含 3 列的表格 ID(主键),when(一些 varchar 值),Created_date(时间戳)
用“When”命名字段会产生任何问题吗?
我一直在查询 update table set table.when='$when' where ID='1'
请推荐
标签 php mysql phpmyadmin
<分区>
我创建了一个包含 3 列的表格 ID(主键),when(一些 varchar 值),Created_date(时间戳)
用“When”命名字段会产生任何问题吗?
我一直在查询 update table set table.when='$when' where ID='1'
请推荐
最佳答案
没关系只要你必须使用表名和列名
update `table`
set `table`.when='$when'
where ID='1'
否则用反引号包裹
update `table`
set `when`='$when'
where ID='1'
其他链接:
如果可能,不要使用保留关键字列表中的名称或标识符以避免出现问题。
关于php - 如果我用 "when"命名 mysql 表中的字段会发生什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14642584/