[pLog-svn] r3315 - plog/trunk/class/summary/dao
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Tue May 2 00:31:56 GMT 2006
Author: jondaley
Date: 2006-05-02 00:31:56 +0000 (Tue, 02 May 2006)
New Revision: 3315
Modified:
plog/trunk/class/summary/dao/summarystats.class.php
Log:
fixes sql error, not sure if this query is doing the right thing
Modified: plog/trunk/class/summary/dao/summarystats.class.php
===================================================================
--- plog/trunk/class/summary/dao/summarystats.class.php 2006-05-01 22:22:51 UTC (rev 3314)
+++ plog/trunk/class/summary/dao/summarystats.class.php 2006-05-02 00:31:56 UTC (rev 3315)
@@ -198,12 +198,12 @@
include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
$prefix = $this->getPrefix();
- $query = "SELECT COUNT(*) as t, SUM((num_reads / (TO_DAYS(NOW()) - TO_DAYS(a.date) + 1)) ) as rank, b.*
+ $query = "SELECT COUNT(a.id) as t, SUM((num_reads / (TO_DAYS(NOW()) - TO_DAYS(a.date) + 1)) ) as rank, b.*
FROM {$prefix}articles AS a
INNER JOIN {$prefix}blogs AS b
ON b.id = a.blog_id AND b.status = ".BLOG_STATUS_ACTIVE."
WHERE a.date >= ".$this->_sevenDaysAgo." AND a.date <= ".$this->_now."
- AND in_summary_page = '1'
+ AND in_summary_page = '1' GROUP BY a.id
ORDER BY rank DESC";
if( $maxBlogs > 0 )
More information about the pLog-svn
mailing list