<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>DigInit :: digital initiatives &#187; mysql</title>
	<atom:link href="http://diginit.wordpress.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://diginit.wordpress.com</link>
	<description>building the digital commons for libraries</description>
	<lastBuildDate>Fri, 13 Nov 2009 15:18:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='diginit.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/e4beb2286778f11feb7338d9f2b0f5af?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>DigInit :: digital initiatives &#187; mysql</title>
		<link>http://diginit.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://diginit.wordpress.com/osd.xml" title="DigInit :: digital initiatives" />
		<item>
		<title>Globally match and replace text or string with MySQL query</title>
		<link>http://diginit.wordpress.com/2007/10/21/globally-match-and-replace-text-or-string-with-mysql-query/</link>
		<comments>http://diginit.wordpress.com/2007/10/21/globally-match-and-replace-text-or-string-with-mysql-query/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 21:29:03 +0000</pubDate>
		<dc:creator>Jason A. Clark</dc:creator>
				<category><![CDATA[code/files]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql sql howto]]></category>

		<guid isPermaLink="false">http://diginit.wordpress.com/2007/10/21/globally-match-and-replace-text-or-string-with-mysql-query/</guid>
		<description><![CDATA[In doing some research looking into possible ways to batch replace MSU Library URL strings in our various MySQL databases, I was able to construct this little nugget that will do the trick:
UPDATE table_name SET column_name = REPLACE(column_name, &#8216;old_string/text&#8217;, &#8216;new_string/text&#8217;);
A quick explanation:
table_name is the database table you need to edit.
column_name is the database table column [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=47&subd=diginit&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><font size="2">In doing some research looking into possible ways to batch replace MSU Library URL strings in our various MySQL databases, I was able to construct this little nugget that will do the trick:</font></p>
<blockquote><p><font size="2">UPDATE table_name SET column_name = REPLACE(column_name, &#8216;old_string/text&#8217;, &#8216;new_string/text&#8217;);</font></p></blockquote>
<p><font size="2">A quick explanation:</font></p>
<p><font size="2">table_name is the database table you need to edit.<br />
column_name is the database table column name to edit.<br />
old_string/text is the original string or text to match and replace.<br />
new_string/text is the new string or text you want to add.</font></p>
<blockquote></blockquote>
<p><font size="2">It&#8217;s short, sweet, and delightfully efficient. The longevity and active development around MySQL and SQL always surprise me. If you have a business problem, chances are there is a function or built procedure already in the code ready to answer the problem.</font></p>
<p><font size="2">Tips and tricks just like this can be found pretty regularly by trolling the <a href="http://dev.mysql.com/doc/refman/5.0/en/">MySQL manual and forums</a>. Another method for keeping up and learning is &#8220;tagwatching&#8221; on del.icio.us. Some possibilities for watching the tag &#8220;mysql&#8221;:</font></p>
<p><font size="2">HTML page: <a href="http://del.icio.us/tag/mysql">http://del.icio.us/tag/mysql</a></font></p>
<p><font size="2">RSS feed: <a href="http://del.icio.us/rss/tag/mysql">http://del.icio.us/rss/tag/mysql</a></font></p>
<p><font size="2">That&#8217;s right. With that last RSS URL, you can subscribe to a tag and watch as the latest posts come into your feedreader of choice. (del.icio.us  has a feed for all of its tags.)  Good stuff for keeping the learning going. </font></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/diginit.wordpress.com/47/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/diginit.wordpress.com/47/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diginit.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diginit.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diginit.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diginit.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diginit.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=47&subd=diginit&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://diginit.wordpress.com/2007/10/21/globally-match-and-replace-text-or-string-with-mysql-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9c3e8cd1eecfd6a197f17ede70b82a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">diginit</media:title>
		</media:content>
	</item>
	</channel>
</rss>