[pLog-svn] r3586 - plog/trunk/class/summary/dao
mark at devel.lifetype.net
mark at devel.lifetype.net
Fri Jun 16 02:21:50 GMT 2006
Author: mark
Date: 2006-06-16 02:21:49 +0000 (Fri, 16 Jun 2006)
New Revision: 3586
Modified:
plog/trunk/class/summary/dao/summarystats.class.php
Log:
We need to add HHMMSS information into the timestamp, for example, 20060615235959, or MYSQL will treat as "20060615000000".
Modified: plog/trunk/class/summary/dao/summarystats.class.php
===================================================================
--- plog/trunk/class/summary/dao/summarystats.class.php 2006-06-16 02:18:07 UTC (rev 3585)
+++ plog/trunk/class/summary/dao/summarystats.class.php 2006-06-16 02:21:49 UTC (rev 3586)
@@ -37,6 +37,7 @@
if( $t->getDay() < 10 )
$this->_now .= "0";
$this->_now .= $t->getDay();
+ $this->_now .= "235959";
// 7 days ago
$t->subtractSeconds( 7 * 24 * 60 * 60 );
//$this->_sevenDaysAgo = $t->getTimestamp();
@@ -44,6 +45,7 @@
if( $t->getDay() < 10 )
$this->_sevenDaysAgo .= "0";
$this->_sevenDaysAgo .= $t->getDay();
+ $this->_sevenDaysAgo .= "000000";
// get the summary_page_show_max from config
$config =& Config::getConfig();
@@ -251,7 +253,7 @@
$query = "SELECT a.*
FROM {$prefix}articles a,
{$prefix}blogs b
- WHERE a.date >= ".$this->_sevenDaysAgo." AND a.date <= NOW()
+ WHERE a.date >= ".$this->_sevenDaysAgo." AND a.date <= ".$this->_now."
AND a.blog_id = b.id
AND b.status = ".BLOG_STATUS_ACTIVE."
AND a.status = ".POST_STATUS_PUBLISHED."
More information about the pLog-svn
mailing list