1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 15:17:16 +01:00

[ticket/12366] Include ORDER BY into the query builder

PHPBB3-12366
This commit is contained in:
PayBas 2014-04-07 23:06:09 +02:00
parent 03e081df26
commit fadbd23456

View File

@ -655,6 +655,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
), ),
), ),
'WHERE' => $sql_where, '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 $sql = "SELECT $sql_select
FROM $sql_from FROM $sql_from
WHERE $sql_where"; 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 = $db->sql_query($sql);
$result_topic_id = 0; $result_topic_id = 0;