<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>MySQL substring replace, with simple query builder</title>
<link>http://www.mdj.us/</link>
<description>A simple way to perform a substring replace in MySQL. With a basic form to build your own query.</description>
<language>en</language>
<item>
<title>Ray</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1554</link>
<pubDate>Mon, 12 Dec 2011 17:04:50 +0000</pubDate>
<content:encoded><![CDATA[Thanks a lot, Matt!]]></content:encoded>
</item>
<item>
<title>Matt</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1553</link>
<pubDate>Sun, 11 Dec 2011 18:34:07 +0000</pubDate>
<content:encoded><![CDATA[Hi Ray, <br />
<br />
You want to use concat. <br />
<br />
[sql]UPDATE table SET field=concat(field,'string to append');[/sql]<br />
<br />
That should add your string to the end of each record. Totally untested however, on my phone watching the football game right now :-)]]></content:encoded>
</item>
<item>
<title>Ray</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1552</link>
<pubDate>Sun, 11 Dec 2011 16:02:53 +0000</pubDate>
<content:encoded><![CDATA[Thanks Matt,<br />
<br />
It is a great example I'm looking for!<br />
<br />
Besides, if I want to adding a string at the end of each record for a table. What should I do on the SQL?<br />
<br />
Thanks]]></content:encoded>
</item>
<item>
<title>Matt</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1549</link>
<pubDate>Sat, 10 Dec 2011 15:39:33 +0000</pubDate>
<content:encoded><![CDATA[Hi Mark,<br />
<br />
The field is the column name you'd like to perform the find &amp; replace on.<br />
<br />
For example, say you have a table for a simple blog called &quot;Posts&quot;, and within that table there is an id column, a post_title column, a postdate column, and a post_content column (this contains the actual blog post content). The table would look something like this;<br />
<br />
<a href="http://www.mdj.us/images/db-example.png" rel="nofollow">http://www.mdj.us/images/db-example.png</a><br />
<br />
When you say the whole database, you're talking about multiple tables &amp; columns like that, are you sure that's what you're looking for?<br />
<br />
If I really needed to perform that global of a find &amp; replace, I would probably write a PHP script to loop through all the fields I wanted to do a find &amp; replace on.]]></content:encoded>
</item>
<item>
<title>Mark Penny</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1548</link>
<pubDate>Sat, 10 Dec 2011 13:16:01 +0000</pubDate>
<content:encoded><![CDATA[Excellent tool, but I have no idea what a field is. I want to replace text with another all through the whole database. <br />
<br />
What do i stick in 'field name']]></content:encoded>
</item>
<item>
<title>Visages</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1545</link>
<pubDate>Thu, 08 Dec 2011 16:13:43 +0000</pubDate>
<content:encoded><![CDATA[Excellent. Thanks a lot for this great solution]]></content:encoded>
</item>
<item>
<title>jim</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1372</link>
<pubDate>Sun, 10 Apr 2011 02:45:09 +0000</pubDate>
<content:encoded><![CDATA[Perfect example. I have been looking for about an hour until I found this example. I put kudos on wikispeedia.org]]></content:encoded>
</item>
<item>
<title>Mike S</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1353</link>
<pubDate>Sun, 20 Mar 2011 17:44:22 +0000</pubDate>
<content:encoded><![CDATA[This is a good article witch show how to replace substrings from a field on just some rows<br />
<a href="http://wiki.nisi.ro/2011/03/how-to-replace-substring-in-mysql-table-field/" rel="nofollow">http://wiki.nisi.ro/2011/03/how-to-replace-substring-in-mysql-table-field/</a>]]></content:encoded>
</item>
<item>
<title>Mohinish</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1271</link>
<pubDate>Fri, 22 Oct 2010 21:51:33 +0000</pubDate>
<content:encoded><![CDATA[Awesome Query Generator. Really nice work.]]></content:encoded>
</item>
<item>
<title>gauz</title>
<description></description>
<link>http://www.mdj.us/web-development/mysql/mysql-substring-replace-with-simple-query-builder/#comment-1264</link>
<pubDate>Thu, 07 Oct 2010 07:06:27 +0000</pubDate>
<content:encoded><![CDATA[Thanks youuu ....]]></content:encoded>
</item>
</channel>
</rss>

