aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMarek A. RuszczyƄski <aptx@phpbb.com>2010-03-02 20:36:26 +0100
committerNils Adermann <naderman@naderman.de>2010-03-02 21:12:35 +0100
commit93a2407f6549a0236741973c1fdc980539ce6c0c (patch)
tree9001b727fe232c7cffa5e5e968800d0e22e7a65b /phpBB/includes/functions_posting.php
parent5003595ed6f05de7b6c50973aa26bb573d365caa (diff)
downloadforums-93a2407f6549a0236741973c1fdc980539ce6c0c.tar
forums-93a2407f6549a0236741973c1fdc980539ce6c0c.tar.gz
forums-93a2407f6549a0236741973c1fdc980539ce6c0c.tar.bz2
forums-93a2407f6549a0236741973c1fdc980539ce6c0c.tar.xz
forums-93a2407f6549a0236741973c1fdc980539ce6c0c.zip
Bug #54945 again: MySQL 4 does not support aggregation in ORDER BY.
Moved the MIN(smiley_order) to the SELECT column list now, so it can be used for sorting on MySQL 4, but also still works on MSSQL, which the bug was originally about.
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 49ea382411..21c5fe7aca 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -85,10 +85,10 @@ function generate_smilies($mode, $forum_id)
if ($mode == 'window')
{
- $sql = 'SELECT smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height
+ $sql = 'SELECT smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height, MIN(smiley_order) AS min_smiley_order
FROM ' . SMILIES_TABLE . '
GROUP BY smiley_url, smiley_width, smiley_height
- ORDER BY MIN(smiley_order)';
+ ORDER BY min_smiley_order';
$result = $db->sql_query_limit($sql, $config['smilies_per_page'], $start, 3600);
}
else