mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-03 00:28:53 +00:00
[ticket/12366] Include ORDER BY into the query builder
PHPBB3-12366
This commit is contained in:
parent
03e081df26
commit
fadbd23456
1 changed files with 2 additions and 1 deletions
|
@ -655,6 +655,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
),
|
||||
),
|
||||
'WHERE' => $sql_where,
|
||||
'ORDER_BY' => $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'),
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -716,8 +717,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
$sql = "SELECT $sql_select
|
||||
FROM $sql_from
|
||||
WHERE $sql_where";
|
||||
$sql .= ' ORDER BY ' . $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
||||
}
|
||||
$sql .= ' ORDER BY ' . $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
||||
$result = $db->sql_query($sql);
|
||||
$result_topic_id = 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue