[pLog-svn] r652 - plog/trunk/class/summary/dao
subaochen at devel.plogworld.net
subaochen at devel.plogworld.net
Mon Jan 3 01:42:16 GMT 2005
Author: subaochen
Date: 2005-01-03 01:42:16 +0000 (Mon, 03 Jan 2005)
New Revision: 652
Modified:
plog/trunk/class/summary/dao/summarystats.class.php
Log:
I think "select *" is not a good style:-). In fact, this make getMostReadArticles works wrong, because the two tables both has id field
Modified: plog/trunk/class/summary/dao/summarystats.class.php
===================================================================
--- plog/trunk/class/summary/dao/summarystats.class.php 2005-01-03 01:05:42 UTC (rev 651)
+++ plog/trunk/class/summary/dao/summarystats.class.php 2005-01-03 01:42:16 UTC (rev 652)
@@ -88,7 +88,21 @@
function getMostReadArticles( $maxPosts = 0, $ignoreTopic = "", $ignoreText = "", $date = 0 )
{
$this->log->debug("getMostReadArticles, ignoreTopic is ".$ignoreTopic);
- $query = " SELECT *
+ $query = " SELECT
+ a.id as id,
+ a.properties as properties,
+ a.date as date,
+ a.user_id as user_id,
+ a.blog_id as blog_id,
+ a.status as status,
+ a.num_reads as num_reads,
+ a.slug as slug,
+ t.article_id as article_id,
+ t.text as text,
+ t.topic as topic,
+ t.normalized_text as normalized_text,
+ t.normalized_topic as normalized_topic,
+ t.mangled_topic as mangled_topic
FROM ".$this->getPrefix()."articles a, ".$this->getPrefix()."articles_text t
WHERE a.id = t.article_id
AND status = ".POST_STATUS_PUBLISHED."
More information about the pLog-svn
mailing list