<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[mysql低版本日期相加机器联合查询。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Wed, 26 Mar 2008 08:27:02 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	mysql低版本日期相加：<br/>select opendate,openlong,INTERVAL openlong DAY + opendate from enter_status;<br/><br/>线上跑的sql：<br/>select a.enterpriseid,b.name,a.opendate,a.openlong,INTERVAL a.openlong DAY + a.opendate as now from enter_status a,domain b where TO_DAYS(NOW()) - TO_DAYS(a.opendate) &gt; a.openlong+7 and a.enterpriseid=b.enterpriseid<br/>-----------------------------------------------------------------------------------------------------------------<br/><br/><br/>select b.enterpriseid from enter_status a,enterprise b where TO_DAYS(NOW()) - TO_DAYS(a.opendate) &gt; a.openlong+1 and a.enterpriseid=b.enterpriseid and b.expiration=0 and b.flag=2 limit 10;<br/><br/>状态为 b.expiration=1 b.flag=1 为过期，发提醒信件，但是还能正常收发信，但是正常企业0 2 也有过期的，是由于程序没有放置标志位！<br/><br/><br/><br/>mysql -uroot -p enterprise &lt; in.txt &gt; out.txt<br/>准确的sql：<br/>SELECT&nbsp;&nbsp;b.enterpriseid,c.name,opendate,openlong,ADDDATE(a.opendate,a.openlong) from enter_status a,enterprise b,domain c where TO_DAYS(NOW()) - TO_DAYS(a.opendate) &gt; a.openlong+1 and a.enterpriseid=b.enterpriseid and b.enterpriseid=c.enterpriseid and a.enterpriseid=c.enterpriseid limit 15<br/><br/>更准确：<br/>select&nbsp;&nbsp;b.enterpriseid,c.name,a.opendate,a.openlong,ADDDATE(a.opendate,a.openlong) from enter_status a,enterprise b,domain c where TO_DAYS(NOW()) - TO_DAYS(a.opendate) &gt; a.openlong+1 and a.enterpriseid=b.enterpriseid and b.enterpriseid=c.enterpriseid and a.enterpriseid=c.enterpriseid and b.expiration=1 and b.flag=1 group by c.enterpriseid limit 15;<br/><br/>select a.enterpriseid,b.name,a.opendate,a.openlong,ADDDATE(a.opendate,a.openlong) from enter_status a,domain b where TO_DAYS(NOW()) - TO_DAYS(a.opendate) &gt; a.openlong+7 and a.enterpriseid=b.enterpriseid;<br/><br/>导入时候第4行可能有错：改为：<br/> `check` tinyint(4) NOT NULL default &#039;1&#039;
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] mysql低版本日期相加机器联合查询。]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>