bug 619097 ORDER BY SUM

This commit is contained in:
Marc Delisle
2002-10-21 16:59:36 +00:00
parent 0496109f93
commit 9995c8dd0d
2 changed files with 7 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ $Source$
2002-10-21 Marc Delisle <lem9@users.sourceforge.net>
* lang/spanish: removed control M
* tbl_relation.php3, bug 619100, relation and non-primary key
* libraries/display_tbl.lib.ph3, bug 619097, order by sum(var)
2002-10-19 Alexander M. Turek <rabus@users.sourceforge.net>
* translators.html, spanish-*.inc.php3: Updates, thanks again to

View File

@@ -575,7 +575,12 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
if (empty($sql_order)) {
$is_in_sort = FALSE;
} else {
$is_in_sort = eregi('[[:space:]](`?)' . str_replace('\\', '\\\\', $fields_meta[$i]->name) . '(`?)[ ,$]', $sql_order);
//$is_in_sort = eregi('[[:space:]](`?)' . str_replace('\\', '\\\\', $fields_meta[$i]->name) . '(`?)[ ,$]', $sql_order);
$pattern = str_replace('\\', '\\\\', $fields_meta[$i]->name);
$pattern = str_replace('(','\(', $pattern);
$pattern = str_replace(')','\)', $pattern);
$is_in_sort = eregi('[[:space:]](`?)' . $pattern . '(`?)[ ,$]', $sql_order);
}
// 2.1.3 Checks if the table name is required (it's the case
// for a query with a "JOIN" statement and if the column