bug #1179887 ordering by count(*)

This commit is contained in:
Marc Delisle
2005-04-27 17:28:17 +00:00
parent 039fb15620
commit ca7da27978
2 changed files with 8 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ $Source$
2005-04-27 Marc Delisle <lem9@users.sourceforge.net> 2005-04-27 Marc Delisle <lem9@users.sourceforge.net>
* lang/finnish: update, thanks to Jouni Kahkonen * lang/finnish: update, thanks to Jouni Kahkonen
* lang/russian: update, thanks to lobovich * lang/russian: update, thanks to lobovich
* libraries/sqlparser.lib.php: bug #1179887, ordering by count(*)
2005-04-26 Marc Delisle <lem9@users.sourceforge.net> 2005-04-26 Marc Delisle <lem9@users.sourceforge.net>
* tbl_properties_structure.php, tbl_properties.inc.php: * tbl_properties_structure.php, tbl_properties.inc.php:

View File

@@ -1480,11 +1480,16 @@ if ($is_minimum_common == FALSE) {
} }
} }
// FIXME: is it correct to always add $sep ?
if (isset($subresult['queryflags']['select_from']) if (isset($subresult['queryflags']['select_from'])
&& $subresult['queryflags']['select_from'] == 1 && $subresult['queryflags']['select_from'] == 1
&& !$seen_order) { && !$seen_order) {
$unsorted_query .= $arr[$i]['data'] . $sep; $unsorted_query .= $arr[$i]['data'];
if ($arr[$i]['type'] != 'punct_bracket_open_round'
&& $arr[$i]['type'] != 'punct_bracket_close_round'
&& $arr[$i]['type'] != 'punct') {
$unsorted_query .= $sep;
}
} }
// clear $upper_data for next iteration // clear $upper_data for next iteration