<?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>kglife developer&#039;s blog &#187; mysql</title>
	<atom:link href="http://blog.kglife.com/tag/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.kglife.com</link>
	<description>our web,our life</description>
	<lastBuildDate>Sat, 28 Nov 2009 16:37:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>提高MYSQL SQL执行效率的几点建议</title>
		<link>http://blog.kglife.com/11_77.html</link>
		<comments>http://blog.kglife.com/11_77.html#comments</comments>
		<pubDate>Sun, 08 Nov 2009 17:57:45 +0000</pubDate>
		<dc:creator>ckson</dc:creator>
				<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[开发日志]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[效率]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=77</guid>
		<description><![CDATA[提高SQL执行效率的几点建议:
◆尽量不要在where中包含子查询;]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_77.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>上传文件到MYSQL数据库中</title>
		<link>http://blog.kglife.com/09_21.html</link>
		<comments>http://blog.kglife.com/09_21.html#comments</comments>
		<pubDate>Wed, 23 Sep 2009 02:04:00 +0000</pubDate>
		<dc:creator>ckson</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[开发日志]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[上传]]></category>
		<category><![CDATA[图片]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=21</guid>
		<description><![CDATA[假如我们现在从一个页面中提交一个文件到PHP文件中处理,代码如下(省略了html提交页面)&#60; ?php&#160;&#160;&#160;&#160; $filename = $_FILES&#91;'userfile'&#93;&#91;'tmp_name'&#93;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if&#40;$_FILES&#91;'userfile'&#93;&#91;'size'&#93;&#38;lt;100&#41; exit&#40;&#34;请选择文件&#34;&#41;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$fp = fopen&#40;$filename,&#160;&#160; &#34;rb&#34;&#41;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$picture = fread&#40;$fp,filesize&#40;$filename&#41;&#41;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$picture = base64_encode&#40;$picture&#41;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;fclose&#40;$fp&#41;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$data&#91;'p_pic'&#93; = $picture;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$data&#91;'type'&#93; = $_FILES&#91;'userfile'&#93;&#91;'type'&#93;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$data&#91;'file_name'&#93; = $_FILES&#91;'userfile'&#93;&#91;'name'&#93;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$data&#91;'file_size'&#93; = $_FILES&#91;'userfile'&#93;&#91;'size'&#93;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$data&#91;'content'&#93; = $_POST&#91;'content'&#93;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$connect =MYSQL_CONNECT&#40;&#34;localhost&#34;,&#34;root&#34;,&#34;&#34;&#41; or die&#40;&#34;Unable to connect to MySQL server&#34;&#41;; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;mysql_select_db&#40; &#34;test&#34;&#41; or die&#40;&#34;Unable to select database&#34;&#41;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$result=MYSQL_QUERY&#40; &#34;INSERT INTO&#160;&#160;(p_pic,type,file_name,file_size,filetype,content) VALUES ('$data[p_pic]','$data[type]','$data[file_name]','$data[file_size]','$data[content]')&#34;&#41;; $id= mysql_insert_id&#40;&#41;; MYSQL_CLOSE&#40;&#41;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;header&#40;'Content-Type: text/html; charset=utf-8'&#41;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if&#40;$res&#41; &#123;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;echo &#34;添加成功,调用地址是:&#60;a target=\&#34;_blank\&#34; href=\&#34;你的地址/getPic/&#34;.$res.&#34;\&#34;&#62;打开&#34;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#125; else &#123;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;echo &#34;上传出错了&#34; ;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#125;?&#62;&#60;!--wp_fromhtmlpreview_devfmt--&#62;&#60; [...]]]></description>
		<wfw:commentRss>http://blog.kglife.com/09_21.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
