<?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>PHPMan--Live and learn &#187; Database relate</title>
	<atom:link href="http://www.phpman.com.cn/archives/category/database-relate/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phpman.com.cn</link>
	<description>不积跬步,无以至千里;不积小流,无以成江海</description>
	<lastBuildDate>Wed, 28 Jul 2010 02:39:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>mysql中使用外键约束(constraint)或触发器(trigger)来进行级联更新、删除</title>
		<link>http://www.phpman.com.cn/archives/345</link>
		<comments>http://www.phpman.com.cn/archives/345#comments</comments>
		<pubDate>Wed, 09 Jun 2010 09:02:42 +0000</pubDate>
		<dc:creator>phpman</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.phpman.com.cn/?p=345</guid>
		<description><![CDATA[今天在帮同事解决一个关联更新问题时，阅读了下手册，整理下外键约束及trigger的知识，备用=)
我们通常有这样的需求:删除表Table 1,并删除其它表中与Table 1有关的若干记录。
举个例子:
现有2个实体- 学生、课程，1种联系- 成绩
分别创建 学生表 students, 课程表course,成绩表score

--创建 学生表 students
CREATE TABLE IF NOT EXISTS `students` &#40;
  `id` int&#40;11&#41; NOT NULL AUTO_INCREMENT,
  `name` varchar&#40;32&#41; DEFAULT '',
  PRIMARY KEY &#40;`id`&#41;
&#41; ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
&#160;
--插入若干记录
INSERT INTO `students` &#40;`id`, `name`&#41; VALUES
&#40;1, 'john'&#41;,
&#40;2, 'lucy'&#41;,
&#40;4, 'jack'&#41;;
&#160;
--创建课程表
CREATE TABLE IF NOT EXISTS `course` &#40;
  `id` int&#40;11&#41; NOT NULL [...]]]></description>
		<wfw:commentRss>http://www.phpman.com.cn/archives/345/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql table status 如:取最近更新时间</title>
		<link>http://www.phpman.com.cn/archives/343</link>
		<comments>http://www.phpman.com.cn/archives/343#comments</comments>
		<pubDate>Thu, 08 Apr 2010 11:32:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.phpman.com.cn/?p=343</guid>
		<description><![CDATA[$conn = mysql_connect();
$sql = &#8220;SHOW TABLE STATUS FROM `DATABASE` WHERE `Name` = &#8216;TABLE&#8221;;
$rs = mysql_query($sql,$conn);
while($row = mysql_fetch_object($rs)) $updatetime = $row->Update_time;
print_r($updatetime); 
]]></description>
		<wfw:commentRss>http://www.phpman.com.cn/archives/343/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP与Mysql函数对照整理</title>
		<link>http://www.phpman.com.cn/archives/147</link>
		<comments>http://www.phpman.com.cn/archives/147#comments</comments>
		<pubDate>Wed, 20 May 2009 08:03:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.phpman.com.cn/?p=147</guid>
		<description><![CDATA[平时对MYSQL函数使用较少，想使用时确不记得函数名及参数用法。
现对比PHP整理下，便于记忆……
本页将不断更新，直至完善]]></description>
		<wfw:commentRss>http://www.phpman.com.cn/archives/147/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>php通过localhost访问mysql.sock</title>
		<link>http://www.phpman.com.cn/archives/139</link>
		<comments>http://www.phpman.com.cn/archives/139#comments</comments>
		<pubDate>Sat, 09 May 2009 03:39:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.phpman.com.cn/?p=139</guid>
		<description><![CDATA[经常我们编译mysql会指定prefix,把生成的bin,lib这些目录到指定位置，或又指定数据目录等。
那我们就需要在my.cnf修改相关选项，如basedir,datadir等……]]></description>
		<wfw:commentRss>http://www.phpman.com.cn/archives/139/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MYSQL的模式匹配</title>
		<link>http://www.phpman.com.cn/archives/126</link>
		<comments>http://www.phpman.com.cn/archives/126#comments</comments>
		<pubDate>Fri, 24 Apr 2009 09:35:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[正则]]></category>

		<guid isPermaLink="false">http://www.phpman.com.cn/?p=126</guid>
		<description><![CDATA[mysql中除了常用的"_"、"%"外，mysql还提供扩展的正则表达式，使用REGEXP关键字……]]></description>
		<wfw:commentRss>http://www.phpman.com.cn/archives/126/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
