开发者

SQL Update Error with replace

开发者 https://www.devze.com 2023-03-27 09:52 出处:网络
I can\'t see what is wrong with this SQL: UPDATE Show SETEnterOnine = replace(EnterOnine, \'http://projects.example.co.uk\', \'http://www.example.co.uk\')

I can't see what is wrong with this SQL:

UPDATE Show
SET    EnterOnine = replace(EnterOnine, 'http://projects.example.co.uk', 'http://www.example.co.uk')
WHERE  EnterOnine LIKE '%http://projects.example.co.uk%'

I am getting this error when I enter this into PHPmyadmin:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the r开发者_如何学编程ight syntax to use near 'Show SET EnterOnine = replace(EnterOnine, 'http://projects.example.co.uk' at line 1


Show is a reserved word in mysql, escape with back ticks.

UPDATE `Show` SET ...
0

精彩评论

暂无评论...
验证码 换一张
取 消