I wish to update tables in a WordPress database, and I am confident with what I wish to achieve, and it won't do any damage, I am struggling to achieve what I want.
in the post_content field there is:
<img class="aligncenter wp-image-1603" title="365 Days of Robot, Day 4" alt="365 Days of Robot, Day 41" src="http://www.silversnaps.co.uk/wp-content/uploads/041-365-Days-of-Robot.jpg" />
Now I wish to replace the img class with
<img class="aligncenter wp-image-1603 img-responsive"
I know how to update the table - but I can't figue out how to match what I wish to update. I would like to add the class 'img-responsive' at tne end of the class.
UPDATE your_table SET post_content = REPLACE(post_content, '<img class="%"', '<img Class"% img-responsive') WHERE post_content LIKE '%<img class"%"'