Greg Dietrich
Greg Dietrich

Reputation: 96

Change URL's in a Table through phpMyAdmin

I'm not real savvy with databases at this point, but I know what I want to do.

I have a table, cgs_se_messages, that contains a column that is audio_url. In that column is a link such as, /sermons/20150118.mp3

In order for me to create a podcast feed I have to have the full URL in that field. I've already loaded over 150 of these things into my website, so how can I simply say:

In the table cgs_se_messages where the column is audio_url, replace /sermons/ with http://myurl.com/sermons/ and still keep the file name on the end? Hopefully this make sense...

Upvotes: 0

Views: 249

Answers (1)

James Waddington
James Waddington

Reputation: 2905

In the sql tab you can enter an update statement, which would look something like this:

UPDATE cgs_se_messages SET audio_url = replace(audio_url, '/sermons/','http://myurl.com/sermons/');

Upvotes: 1

Related Questions