could not go to next page of a query containing a function like SUM

This commit is contained in:
Marc Delisle
2002-09-24 16:45:44 +00:00
parent 09935c60f4
commit 2e9826a8a1
2 changed files with 6 additions and 2 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-09-24 Marc Delisle <lem9@users.sourceforge.net>
* sql.php3: could not go to next page when browsing a query containing
a function like SUM(), due to IFs in reversed sequence
* lang/french update
2002-09-24 Michal Cihar <nijel@users.sourceforge.net>
* lang/czech-*.inc.php3: update

View File

@@ -8,7 +8,6 @@
require('./libraries/grab_globals.lib.php3');
require('./libraries/common.lib.php3');
/**
* Defines the url to return to in case of error in a sql statement
*/
@@ -274,8 +273,8 @@ else {
// "SELECT COUNT(...) FROM ... GROUP BY ..."
$is_explain = $is_count = $is_export = $is_delete = $is_insert = $is_affected = $is_show = $is_maint = $is_analyse = $is_group = $is_func = FALSE;
if ($is_select) { // see line 141
$is_func = !$is_group && (eregi('[[:space:]]+(SUM|AVG|STD|STDDEV|MIN|MAX|BIT_OR|BIT_AND)\s*\(', $sql_query));
$is_group = eregi('[[:space:]]+(GROUP BY|HAVING|SELECT[[:space:]]+DISTINCT)[[:space:]]+', $sql_query);
$is_func = !$is_group && (eregi('[[:space:]]+(SUM|AVG|STD|STDDEV|MIN|MAX|BIT_OR|BIT_AND)\s*\(', $sql_query));
$is_count = !$is_group && (eregi('^SELECT[[:space:]]+COUNT\((.*\.+)?.*\)', $sql_query));
$is_export = (eregi('[[:space:]]+INTO[[:space:]]+OUTFILE[[:space:]]+', $sql_query));
$is_analyse = (eregi('[[:space:]]+PROCEDURE[[:space:]]+ANALYSE\(', $sql_query));