<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Search and Replace text in whole MySQL database</title>
	<atom:link href="http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/</link>
	<description>Online Marketing, SEO, Search engine optimisation, optimization, Web Development, digital strategy, digital strategist, online marketing consultant</description>
	<lastBuildDate>Mon, 30 Jan 2012 03:18:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: alberto</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-295</link>
		<dc:creator>alberto</dc:creator>
		<pubDate>Fri, 20 Jan 2012 16:47:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-295</guid>
		<description>Great script! thanks a lot.&lt;br&gt;I have just one suggestion.I used this script to do a search and replace in my magento db, and some column names have reserved words, so I needed backticks  in order to make it work.Just changed &lt;br&gt; $sql[$handle][&#039;sql&#039;] = &#039;UPDATE &#039;.$table.&#039; SET `&#039;.$field.&#039;` = REPLACE(`&#039;.$field.&#039;`,&#039;&#039;.$search.&#039;&#039;,&#039;&#039;.$replace.&#039;&#039;)&#039;;&lt;br&gt;and&lt;br&gt;     $sql[$handle][&#039;sql&#039;] = &#039;SELECT * FROM &#039;.$table.&#039; WHERE `&#039;.$field.&#039;` REGEXP(&#039;&#039;.$search.&#039;&#039;)&#039;;&lt;br&gt;on lines 88 and 90</description>
		<content:encoded><![CDATA[<p>Great script! thanks a lot.<br />I have just one suggestion.I used this script to do a search and replace in my magento db, and some column names have reserved words, so I needed backticks  in order to make it work.Just changed <br /> $sql[$handle][&#39;sql&#39;] = &#39;UPDATE &#39;.$table.&#39; SET `&#39;.$field.&#39;` = REPLACE(`&#39;.$field.&#39;`,&#39;&#39;.$search.&#39;&#39;,&#39;&#39;.$replace.&#39;&#39;)&#39;;<br />and<br />     $sql[$handle][&#39;sql&#39;] = &#39;SELECT * FROM &#39;.$table.&#39; WHERE `&#39;.$field.&#39;` REGEXP(&#39;&#39;.$search.&#39;&#39;)&#39;;<br />on lines 88 and 90</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Urselinho</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-244</link>
		<dc:creator>Urselinho</dc:creator>
		<pubDate>Mon, 07 Nov 2011 20:46:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-244</guid>
		<description>Thanks alot...will save me a lot of time!!!!</description>
		<content:encoded><![CDATA[<p>Thanks alot&#8230;will save me a lot of time!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PerfectAnswer</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-231</link>
		<dc:creator>PerfectAnswer</dc:creator>
		<pubDate>Fri, 14 Oct 2011 16:55:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-231</guid>
		<description>Thank you for sharing this great script!&lt;br&gt;Runs like a charme, very well inline documentation, good looking output.&lt;br&gt;Very Happy with your script.&lt;br&gt;Regards from Hamburg/Germany&lt;br&gt;Bernd</description>
		<content:encoded><![CDATA[<p>Thank you for sharing this great script!<br />Runs like a charme, very well inline documentation, good looking output.<br />Very Happy with your script.<br />Regards from Hamburg/Germany<br />Bernd</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guest</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-227</link>
		<dc:creator>Guest</dc:creator>
		<pubDate>Sat, 10 Sep 2011 10:38:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-227</guid>
		<description>Thank you! You saved me load of time.</description>
		<content:encoded><![CDATA[<p>Thank you! You saved me load of time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ligi</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-204</link>
		<dc:creator>Ligi</dc:creator>
		<pubDate>Thu, 02 Jun 2011 00:17:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-204</guid>
		<description>Just used it on the live site, one thing to keep in mind : if the replace involves image names in the database, then you will have to adjust the filenames of the images on the server....</description>
		<content:encoded><![CDATA[<p>Just used it on the live site, one thing to keep in mind : if the replace involves image names in the database, then you will have to adjust the filenames of the images on the server&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ligi</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-203</link>
		<dc:creator>Ligi</dc:creator>
		<pubDate>Wed, 01 Jun 2011 21:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-203</guid>
		<description>great, tnx a million! my client changed all their flower names in a CMS. I was hoping not having to do it manually....</description>
		<content:encoded><![CDATA[<p>great, tnx a million! my client changed all their flower names in a CMS. I was hoping not having to do it manually&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sacameunojo</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-199</link>
		<dc:creator>Sacameunojo</dc:creator>
		<pubDate>Thu, 05 May 2011 11:45:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-199</guid>
		<description>Voodoo!!!&lt;br&gt;&lt;br&gt;You are my hero!</description>
		<content:encoded><![CDATA[<p>Voodoo!!!</p>
<p>You are my hero!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guest</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-198</link>
		<dc:creator>Guest</dc:creator>
		<pubDate>Mon, 25 Apr 2011 20:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-198</guid>
		<description>I used the script with GUI - many thanks for your part in this. Pure genius to a person like me, who has only a centimeter worth of knowledge (kilometers wide though), but I can still drown in code more than a line deep.</description>
		<content:encoded><![CDATA[<p>I used the script with GUI &#8211; many thanks for your part in this. Pure genius to a person like me, who has only a centimeter worth of knowledge (kilometers wide though), but I can still drown in code more than a line deep.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Netflow Developments &#187; Blog Archive &#187; How to do a global search and replace within a DB across all Tables</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-197</link>
		<dc:creator>Netflow Developments &#187; Blog Archive &#187; How to do a global search and replace within a DB across all Tables</dc:creator>
		<pubDate>Tue, 19 Apr 2011 18:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-197</guid>
		<description>[...] As part of my take over the world campaign I&#8217;ve run into the need to automatically do a global Search and replace within a Mysql Database covering all tables.  For this you need a little php magic and luckily enough I found just that magic right here. [...]</description>
		<content:encoded><![CDATA[<p>[...] As part of my take over the world campaign I&#8217;ve run into the need to automatically do a global Search and replace within a Mysql Database covering all tables.  For this you need a little php magic and luckily enough I found just that magic right here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: walmley website design</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-190</link>
		<dc:creator>walmley website design</dc:creator>
		<pubDate>Tue, 01 Feb 2011 18:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-190</guid>
		<description>I recently wanted to replace a string within MySQL on the fly, but the field could contain 2 items. So I wrapped a REPLACE() within a REPLACE(), such as:&lt;br&gt;&lt;br&gt;REPLACE(REPLACE(field_name, “what we are looking for”, “replace first instance”), “something else we are looking for”, “replace second instance”)&lt;br&gt;&lt;br&gt;This is the syntax I used to detect a boolean value:&lt;br&gt;&lt;br&gt;REPLACE(REPLACE(field, 1, “Yes”), 0, “No”)&lt;br&gt;&lt;br&gt;Hope this helps!</description>
		<content:encoded><![CDATA[<p>I recently wanted to replace a string within MySQL on the fly, but the field could contain 2 items. So I wrapped a REPLACE() within a REPLACE(), such as:</p>
<p>REPLACE(REPLACE(field_name, “what we are looking for”, “replace first instance”), “something else we are looking for”, “replace second instance”)</p>
<p>This is the syntax I used to detect a boolean value:</p>
<p>REPLACE(REPLACE(field, 1, “Yes”), 0, “No”)</p>
<p>Hope this helps!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

