John Magnolia
John Magnolia

Reputation: 16793

SQL Update Error with replace

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 right syntax to use near 'Show SET EnterOnine = replace(EnterOnine, 'http://projects.example.co.uk' at line 1

Upvotes: 2

Views: 865

Answers (1)

JK.
JK.

Reputation: 5136

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

UPDATE `Show` SET ...

Upvotes: 5

Related Questions