Search & Replace Multiple Pieces of HTML & Text in MySQL Field
I noted what the replacements would be for purposes of this question. The sections appear in the order below, as a whole, across 1000's of entries in a MySQL database. I need to make sense of handling the multiple replacements (how to do so) as well as whether to perform through a php function or via the command line in mysql. 

Replace the following with emptiness (code could vary in places): 

    <div style="margin-top: 3em;">
    <h3>The Incandescent Light Bulb Lives!</h3>
    <strong><strong><strong> </strong></strong></strong>
    <div style="float: left; background-color: #c5c5c5; width: 320px; margin: 0px 8px 22px 0px; padding: 8px; text-align: center;">
    
    <img src="images/image.jpg" alt="alt_text" width="292" height="250" />
    
    <strong>Listen Now or Download for Later</strong>
    
Replace the following with different audio tag structure
    
    {audio}Why Congress Cannot Impose A Uniform Rule Of Tyranny ||http://mikesmith.com/mikes_audio/Dec_2011/20111219_church__sponsored.mp3{/audio}
    
Replace the following with emptiness: 

    <a class="jcepopup" dir="ltr" href="images/stories/Allison/help_with_audio_player.jpg" target="_blank">Help with Audio Player</a>
    
Remove any html in this section: 

    </div>
    <div style="margin-top: 3em;">
    
    2011 Mike Smith
    
    Hey folks, its Mike Mike Smith with today's update.
    
    </div>
    <div style="margin-top: 3em;">
    
    The incandescent lightbulb is back, it is legal and the ban, set to begin on January 1, 2012 has been repealed. That is the news across the wires today but it is only partially true. The Republicans in the house stuffed a provision in the $1 Trillion omnibus spending bill that prevents the Department of Energy from spending any money to enforce the ban which is still on the books. This begs the question for conservatives to answer: if Congress can forbid and or defund unconstitutional activities that regulatory agencies are making (like enforcing light bulb bans) then why cant the same Congress just un-fund enforcement of say The Endangered Species Act or the equally nefarious activities of the NLRB?Why couldnt Congress not fund ObamaCare? Why couldnt Congress un fund GM or AIG or bailouts to Fannie Mae and Freddie Mac? The answer is of course, Congress CAN ban those expenditures or just not fund them but this would take political courage and outside of standing shoulder to shoulder with Tom Edison what courage have we seen from them? The same can be said of almost any agency or activity that federal regulators are engaging in and people are demanding relief from. This seems like a perfect way to teach some constitutionalism to new members AND to secure Congressional conservatives budget cutter bonafides too but alas, the light bulb act seems to be a loss leader for censuring big government by starving it of funds.
    
    The next time you hear rigorous debate about how best to minimize the impact that the Feds have in say our public schools remember that their activity is funded by the Congress that proved it does not have to spend a dime on anything it does not want to including other bright ideas like studying monkeys high on the DEAs cocaine. Now who is the dim bulb that appropriated funds for that!?
    
    </div>

Replace this section with different video embed structure:

    <div style="clear: both; margin-top: 8px; margin-bottom: 8px;"><object width="720" height="420" classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="src" value="http://mikesmith.com/mikesmith_movies/smithdoc/smith_hd_121911.mov" /><param name="autoplay" value="false" /><param name="cache" value="true" /><embed width="720" height="420" type="video/quicktime" src="http://mikesmith.com/mikesmith_movies/smithdoc/smith_doc_hd_121911.mov" autoplay="false" cache="true" /></object></div>

Replace the following with emptiness:

    <div style="float: right; margin-left: 8px; margin-bottom: 8px; clear: both;"></div>
    <div style="clear: both;">
    <table style="background-color: #cccccc; border-collapse: collapse; border-color: #000000; border-style: solid;" summary="summary" border="3" cellspacing="0" cellpadding="8">
    <tbody>
    <tr valign="top">
    <td style="width: 100%;" valign="middle">Become a <a title="Become a 24/7 Backstage Pass member today and access exclusive members-only audio, video, and more." href="index.php/join-24-7/view-available-memberships" target="_blank">Become a 24/7 Backstage Pass member today.</a> to hear all of Mike's past interviews with Professor Gutzman, Ron Paul and more as well as exclusive access to the Post Show Show, Church Doctrine, and subscriber-only downloads.</td>
    </tr>
    </tbody>
    </table>
    </div>
    </div>
    {sidebar id=51}


Search & Replace Multiple Pieces of HTML & Text in MySQL Field
===

I noted what the replacements would be for purposes of this question. The sections appear in the order below, as a whole, across 1000's of entries in a MySQL database. I need to make sense of handling the multiple replacements (how to do so) as well as whether to perform through a php function or via the command line in mysql. 

Replace the following with emptiness (code could vary in places): 

    <div style="margin-top: 3em;">
    <h3>The Incandescent Light Bulb Lives!</h3>
    <strong><strong><strong> </strong></strong></strong>
    <div style="float: left; background-color: #c5c5c5; width: 320px; margin: 0px 8px 22px 0px; padding: 8px; text-align: center;">
    
    <img src="images/image.jpg" alt="alt_text" width="292" height="250" />
    
    <strong>Listen Now or Download for Later</strong>
    
Replace the following with different audio tag structure
    
    {audio}Why Congress Cannot Impose A Uniform Rule Of Tyranny ||http://mikesmith.com/mikes_audio/Dec_2011/20111219_church__sponsored.mp3{/audio}
    
Replace the following with emptiness: 

    <a class="jcepopup" dir="ltr" href="images/stories/Allison/help_with_audio_player.jpg" target="_blank">Help with Audio Player</a>
    
Remove any html in this section: 

    </div>
    <div style="margin-top: 3em;">
    
    2011 Mike Smith
    
    Hey folks, its Mike Mike Smith with today's update.
    
    </div>
    <div style="margin-top: 3em;">
    
    The incandescent lightbulb is back, it is legal and the ban, set to begin on January 1, 2012 has been repealed. That is the news across the wires today but it is only partially true. The Republicans in the house stuffed a provision in the $1 Trillion omnibus spending bill that prevents the Department of Energy from spending any money to enforce the ban which is still on the books. This begs the question for conservatives to answer: if Congress can forbid and or defund unconstitutional activities that regulatory agencies are making (like enforcing light bulb bans) then why cant the same Congress just un-fund enforcement of say The Endangered Species Act or the equally nefarious activities of the NLRB?Why couldnt Congress not fund ObamaCare? Why couldnt Congress un fund GM or AIG or bailouts to Fannie Mae and Freddie Mac? The answer is of course, Congress CAN ban those expenditures or just not fund them but this would take political courage and outside of standing shoulder to shoulder with Tom Edison what courage have we seen from them? The same can be said of almost any agency or activity that federal regulators are engaging in and people are demanding relief from. This seems like a perfect way to teach some constitutionalism to new members AND to secure Congressional conservatives budget cutter bonafides too but alas, the light bulb act seems to be a loss leader for censuring big government by starving it of funds.
    
    The next time you hear rigorous debate about how best to minimize the impact that the Feds have in say our public schools remember that their activity is funded by the Congress that proved it does not have to spend a dime on anything it does not want to including other bright ideas like studying monkeys high on the DEAs cocaine. Now who is the dim bulb that appropriated funds for that!?
    
    </div>

Replace this section with different video embed structure:

    <div style="clear: both; margin-top: 8px; margin-bottom: 8px;"><object width="720" height="420" classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="src" value="http://mikesmith.com/mikesmith_movies/smithdoc/smith_hd_121911.mov" /><param name="autoplay" value="false" /><param name="cache" value="true" /><embed width="720" height="420" type="video/quicktime" src="http://mikesmith.com/mikesmith_movies/smithdoc/smith_doc_hd_121911.mov" autoplay="false" cache="true" /></object></div>

Replace the following with emptiness:

    <div style="float: right; margin-left: 8px; margin-bottom: 8px; clear: both;"></div>
    <div style="clear: both;">
    <table style="background-color: #cccccc; border-collapse: collapse; border-color: #000000; border-style: solid;" summary="summary" border="3" cellspacing="0" cellpadding="8">
    <tbody>
    <tr valign="top">
    <td style="width: 100%;" valign="middle">Become a <a title="Become a 24/7 Backstage Pass member today and access exclusive members-only audio, video, and more." href="index.php/join-24-7/view-available-memberships" target="_blank">Become a 24/7 Backstage Pass member today.</a> to hear all of Mike's past interviews with Professor Gutzman, Ron Paul and more as well as exclusive access to the Post Show Show, Church Doctrine, and subscriber-only downloads.</td>
    </tr>
    </tbody>
    </table>
    </div>
    </div>
    {sidebar id=51}

