Skip to content

Commit

Permalink
[ticket/16425] Added table alias
Browse files Browse the repository at this point in the history
PHPBB3-16425
  • Loading branch information
kasimi committed Apr 5, 2020
1 parent 21dbabe commit 6cab639
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions phpBB/includes/functions_posting.php
Expand Up @@ -110,23 +110,23 @@ function generate_smilies($mode, $forum_id)
if ($mode == 'window')
{
$sql_ary = [
'SELECT' => 'smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height, MIN(smiley_order) AS min_smiley_order',
'SELECT' => 's.smiley_url, MIN(s.emotion) AS emotion, MIN(s.code) AS code, s.smiley_width, s.smiley_height, MIN(s.smiley_order) AS min_smiley_order',
'FROM' => [
SMILIES_TABLE => 's',
],
'GROUP_BY' => 'smiley_url, smiley_width, smiley_height',
'ORDER_BY' => 'min_smiley_order',
'GROUP_BY' => 's.smiley_url, s.smiley_width, s.smiley_height',
'ORDER_BY' => 's.min_smiley_order',
];
}
else
{
$sql_ary = [
'SELECT' => '*',
'SELECT' => 's.*',
'FROM' => [
SMILIES_TABLE => 's',
],
'WHERE' => 'display_on_posting = 1',
'ORDER_BY' => 'smiley_order',
'WHERE' => 's.display_on_posting = 1',
'ORDER_BY' => 's.smiley_order',
];
}

Expand Down

0 comments on commit 6cab639

Please sign in to comment.