I'm revamping a bunch of my old posts that were originally formatted using tables instead of CSS. What I'd like to do is look through the posts and replace any particular string of HTML with the new CSS selectors, for instance, replace
<tr><td class="step">Step 2</td></tr>
I've tried this:
UPDATE wp_posts SET post_content = REPLACE(post_content, ‘<tr><td class="step"><div class="step_number">2</div></td></tr>’, ‘<h2>Step 2</h2>’);
But it throws an error, likely because of the HTML characters or quotes or something. It's going to be a pain to go through 100 posts and change this stuff unless I can figure out a way to do it globally, so any help would be GREATLY appreciated. I'm sure there's some little trick, but I've spent 2 frustrating hours with Google and am no closer than when I started.
Thanks in advance!