[geeklog-hg] geeklog: missing fields in GROUP BY clauses
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Fri Jun 29 16:18:26 EDT 2012
changeset 8736:56d4331f6bd6
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/56d4331f6bd6
user: Dirk Haun <dirk at haun-online.de>
date: Fri Jun 29 22:01:37 2012 +0200
description:
missing fields in GROUP BY clauses
diffstat:
public_html/index.php | 2 +-
system/lib-syndication.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r d705b6c4f0b6 -r 56d4331f6bd6 public_html/index.php
--- a/public_html/index.php Fri Jun 29 21:47:14 2012 +0200
+++ b/public_html/index.php Fri Jun 29 22:01:37 2012 +0200
@@ -263,7 +263,7 @@
FROM {$_TABLES['stories']} AS s, {$_TABLES['topic_assignments']} AS ta, {$_TABLES['users']} AS u,
{$_TABLES['topics']} AS t WHERE (s.uid = u.uid) AND (ta.tid = t.tid) AND
ta.type = 'article' AND ta.id = s.sid AND
- {$sql} GROUP BY s.sid ORDER BY featured DESC, date DESC LIMIT {$limit} OFFSET {$offset}";
+ {$sql} GROUP BY s.sid,ta.tid,u.uid,t.topic,t.imageurl ORDER BY featured DESC, date DESC LIMIT {$limit} OFFSET {$offset}";
$result = DB_query ($msql);
diff -r d705b6c4f0b6 -r 56d4331f6bd6 system/lib-syndication.php
--- a/system/lib-syndication.php Fri Jun 29 21:47:14 2012 +0200
+++ b/system/lib-syndication.php Fri Jun 29 22:01:37 2012 +0200
@@ -413,7 +413,7 @@
$sql = "SELECT sid,ta.tid,uid,title,introtext,bodytext,postmode,UNIX_TIMESTAMP(date) AS modified,commentcode,trackbackcode
FROM {$_TABLES['stories']}, {$_TABLES['topic_assignments']} ta
WHERE draft_flag = 0 AND date <= NOW() AND ta.type = 'article' AND ta.id = sid $where AND perm_anon > 0
- GROUP BY sid
+ GROUP BY sid,ta.tid
ORDER BY date DESC $limitsql";
$result = DB_query($sql);
More information about the geeklog-cvs
mailing list