Ram*_*u.d 1 php mysql phpmyadmin
我创建了一个包含3列ID(主键)的表,当(某些varchar值),Created_date(timestamp)时
用"When"命名一个字段会产生任何问题吗?
我一直在查询 update table set table.when='$when' where ID='1'
请建议
这是好的,只要你需要使用表名与列名一起
update `table`
set `table`.when='$when'
where ID='1'
Run Code Online (Sandbox Code Playgroud)
否则,用反引号包裹它
update `table`
set `when`='$when'
where ID='1'
Run Code Online (Sandbox Code Playgroud)
其他链接:
如果可能,请不要使用保留关键字列表中的名称或标识符来避免问题.