could not go to next page of a query containing a function like SUM
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$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>
|
2002-09-24 Michal Cihar <nijel@users.sourceforge.net>
|
||||||
* lang/czech-*.inc.php3: update
|
* lang/czech-*.inc.php3: update
|
||||||
|
|
||||||
|
3
sql.php3
3
sql.php3
@@ -8,7 +8,6 @@
|
|||||||
require('./libraries/grab_globals.lib.php3');
|
require('./libraries/grab_globals.lib.php3');
|
||||||
require('./libraries/common.lib.php3');
|
require('./libraries/common.lib.php3');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the url to return to in case of error in a sql statement
|
* Defines the url to return to in case of error in a sql statement
|
||||||
*/
|
*/
|
||||||
@@ -274,8 +273,8 @@ else {
|
|||||||
// "SELECT COUNT(...) FROM ... GROUP BY ..."
|
// "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;
|
$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
|
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_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_count = !$is_group && (eregi('^SELECT[[:space:]]+COUNT\((.*\.+)?.*\)', $sql_query));
|
||||||
$is_export = (eregi('[[:space:]]+INTO[[:space:]]+OUTFILE[[:space:]]+', $sql_query));
|
$is_export = (eregi('[[:space:]]+INTO[[:space:]]+OUTFILE[[:space:]]+', $sql_query));
|
||||||
$is_analyse = (eregi('[[:space:]]+PROCEDURE[[:space:]]+ANALYSE\(', $sql_query));
|
$is_analyse = (eregi('[[:space:]]+PROCEDURE[[:space:]]+ANALYSE\(', $sql_query));
|
||||||
|
Reference in New Issue
Block a user