Reputation: 515
I am trying to replace in all http in database with https Using below code in phpmyadmin but showing syntax error, can anyone guide how to do.
Code
UPDATE
mytable_rsseo_redirects
SET to = replace(to, 'http', 'https');
Upvotes: 0
Views: 2480
Reputation:
to
is a MySQL reserved word, making it a poor choice of column name. (The same applies to from
.)
Since it's a reserved word, it must be surrounded in backticks:
UPDATE `mytable_rsseo_redirects` SET `to` = REPLACE(`to`, 'http', 'https');
Upvotes: 4