diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-06-27 09:41:55 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-06-27 09:41:55 +0000 |
commit | b35b341f08e8c1c318b86e6d5956e683e2300ebc (patch) | |
tree | f46afa13ac5ded9eb87dc52e250498a5b58b7d57 | |
parent | 0544d005f5afa7eabfba3629c27b4981b6d0ebdc (diff) | |
download | brdo-b35b341f08e8c1c318b86e6d5956e683e2300ebc.tar.gz brdo-b35b341f08e8c1c318b86e6d5956e683e2300ebc.tar.bz2 |
- removing the DESC on group by.
-rw-r--r-- | modules/tracker.module | 4 | ||||
-rw-r--r-- | modules/tracker/tracker.module | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/tracker.module b/modules/tracker.module index e643c8db5..576e5f6e5 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -30,10 +30,10 @@ function tracker_comments($id = 0) { $period = time() - variable_get("tracker_period", 259200); // all comments of the past 3 days if not configured to a different value if ($id) { - $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.nid = n.nid WHERE c.timestamp > $period AND c.uid = '%s' GROUP BY n.nid, n.title DESC ORDER BY last_comment DESC LIMIT 10", $id); + $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.nid = n.nid WHERE c.timestamp > $period AND c.uid = '%s' GROUP BY n.nid, n.title ORDER BY last_comment DESC LIMIT 10", $id); } else { - $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.nid = n.nid WHERE c.timestamp > $period GROUP BY n.nid, n.title DESC ORDER BY last_comment DESC LIMIT 10"); + $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.nid = n.nid WHERE c.timestamp > $period GROUP BY n.nid, n.title ORDER BY last_comment DESC LIMIT 10"); } while ($node = db_fetch_object($sresult)) { diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index e643c8db5..576e5f6e5 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -30,10 +30,10 @@ function tracker_comments($id = 0) { $period = time() - variable_get("tracker_period", 259200); // all comments of the past 3 days if not configured to a different value if ($id) { - $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.nid = n.nid WHERE c.timestamp > $period AND c.uid = '%s' GROUP BY n.nid, n.title DESC ORDER BY last_comment DESC LIMIT 10", $id); + $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.nid = n.nid WHERE c.timestamp > $period AND c.uid = '%s' GROUP BY n.nid, n.title ORDER BY last_comment DESC LIMIT 10", $id); } else { - $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.nid = n.nid WHERE c.timestamp > $period GROUP BY n.nid, n.title DESC ORDER BY last_comment DESC LIMIT 10"); + $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.nid = n.nid WHERE c.timestamp > $period GROUP BY n.nid, n.title ORDER BY last_comment DESC LIMIT 10"); } while ($node = db_fetch_object($sresult)) { |