Order by DESC with grouping

This commit is contained in:
Jakub Vrana 2010-10-24 11:52:01 +02:00
parent 8aeb9be791
commit b05684a5c9

View file

@ -254,7 +254,8 @@ if (!$columns) {
if ($name != "") {
$rank++;
$names[$key] = $name;
echo '<th><a href="' . h(remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key) . ($_GET["order"][0] == $key && !$_GET["desc"][0] ? '&desc%5B0%5D=1' : '')) . '">' . apply_sql_function($val["fun"], $name) . "</a>"; //! columns looking like functions
$column = idf_escape($key);
echo '<th><a href="' . h(remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key) . ($order[0] == $column || $order[0] == $key || (!$order && $group[0] == $column) ? '&desc%5B0%5D=1' : '')) . '">' . apply_sql_function($val["fun"], $name) . "</a>"; // $order[0] == $key - COUNT(*) //! columns looking like functions
}
$functions[$key] = $val["fun"];
next($select);