mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
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.
This commit is contained in:
parent
5003595ed6
commit
93a2407f65
1 changed files with 2 additions and 2 deletions
|
@ -85,10 +85,10 @@ function generate_smilies($mode, $forum_id)
|
||||||
|
|
||||||
if ($mode == 'window')
|
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 . '
|
FROM ' . SMILIES_TABLE . '
|
||||||
GROUP BY smiley_url, smiley_width, smiley_height
|
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);
|
$result = $db->sql_query_limit($sql, $config['smilies_per_page'], $start, 3600);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue