<?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/"
	>

<channel>
	<title>白舟工作室 &#187; mysql替换</title>
	<atom:link href="http://www.baizoo.cn/tag/mysql%e6%9b%bf%e6%8d%a2/feed" rel="self" type="application/rss+xml" />
	<link>http://www.baizoo.cn</link>
	<description>——长风破浪会有时</description>
	<lastBuildDate>Mon, 30 Jan 2012 08:09:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>转WordPress之后的一些小问题处理</title>
		<link>http://www.baizoo.cn/archives/398.html</link>
		<comments>http://www.baizoo.cn/archives/398.html#comments</comments>
		<pubDate>Sat, 21 Feb 2009 18:12:35 +0000</pubDate>
		<dc:creator>baizoo</dc:creator>
				<category><![CDATA[网站相关]]></category>
		<category><![CDATA[mysql替换]]></category>
		<category><![CDATA[pjblog]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[转换]]></category>

		<guid isPermaLink="false">http://www.baizoo.cn/?p=398</guid>
		<description><![CDATA[转成Wordpress之后，会有一些路径问题的产生，pjblog上传的部分文件地址是设置成src=&#8221;attachments/格式的。我们需要将其改成src=&#8221;/attachments/格式。这就需要修改数据库了。当然如果将Wordpress的permalink(永久链接)自定义成/%post_id%.html也可以解决这个问题。但是不彻底。 替换mysql的内容的方法可以参考我曾经的一篇文章：用replace函数替换数据库中字符串内容 这里用到的几句执行语句，提供给大家参考。 update wp_posts set post_content=replace(post_content,&#8217;&#8221;attachments/&#8217;,'&#8221;/attachments/&#8217;); update wp_posts set post_content=replace(post_content,&#8217;&#8221;images/&#8217;,'&#8221;/images/&#8217;); update wp_comments set comment_content=replace(comment_content,&#8217;&#8221;images/&#8217;,'&#8221;/images/&#8217;);]]></description>
			<content:encoded><![CDATA[<p>转成Wordpress之后，会有一些路径问题的产生，pjblog上传的部分文件地址是设置成src=&#8221;attachments/格式的。我们需要将其改成src=&#8221;/attachments/格式。这就需要修改数据库了。当然如果将Wordpress的permalink(永久链接)自定义成/%post_id%.html也可以解决这个问题。但是不彻底。</p>
<p>替换mysql的内容的方法可以参考我曾经的一篇文章：<a href="http://www.baizoo.cn/archives/363.html">用replace函数替换数据库中字符串内容</a></p>
<p>这里用到的几句执行语句，提供给大家参考。</p>
<p><coolcode lang="mysql" linenum="off">update wp_posts set post_content=replace(post_content,&#8217;&#8221;attachments/&#8217;,'&#8221;/attachments/&#8217;);</p>
<p>update wp_posts set post_content=replace(post_content,&#8217;&#8221;images/&#8217;,'&#8221;/images/&#8217;);</p>
<p>update wp_comments set comment_content=replace(comment_content,&#8217;&#8221;images/&#8217;,'&#8221;/images/&#8217;);</coolcode></p>
]]></content:encoded>
			<wfw:commentRss>http://www.baizoo.cn/archives/398.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

