bug 760648
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-06-27 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* sql.php3: bug 760648: incorrect result count on MySQL 3
|
||||
|
||||
2003-06-26 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/ukrainian: update, thanks to Markijan Baran
|
||||
* libraries/sqlparser.lib.php3 typo
|
||||
|
13
sql.php3
13
sql.php3
@@ -420,11 +420,12 @@ else {
|
||||
// do not put the order_by_clause, it interferes
|
||||
// run the count query
|
||||
if (PMA_MYSQL_INT_VERSION < 40000) {
|
||||
if ($cnt_all_result = mysql_query($count_query)) {
|
||||
if ($is_group) {
|
||||
if ($cnt_all_result = PMA_mysql_query($count_query)) {
|
||||
//if ($is_group) {
|
||||
if ($count_what == '*') {
|
||||
$unlim_num_rows = @mysql_num_rows($cnt_all_result);
|
||||
} else {
|
||||
$unlim_num_rows = mysql_result($cnt_all_result, 0, 'count');
|
||||
$unlim_num_rows = PMA_mysql_result($cnt_all_result, 0, 'count');
|
||||
}
|
||||
mysql_free_result($cnt_all_result);
|
||||
} else {
|
||||
@@ -439,7 +440,7 @@ else {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mysql_query($count_query);
|
||||
PMA_mysql_query($count_query);
|
||||
if (mysql_error()) {
|
||||
// void. I tried the case
|
||||
// (SELECT `User`, `Host`, `Db`, `Select_priv` FROM `db`)
|
||||
@@ -449,8 +450,8 @@ else {
|
||||
// and although the generated count_query is wrong
|
||||
// the SELECT FOUND_ROWS() work!
|
||||
}
|
||||
$cnt_all_result = mysql_query('SELECT FOUND_ROWS() as count');
|
||||
$unlim_num_rows = mysql_result($cnt_all_result,0,'count');
|
||||
$cnt_all_result = PMA_mysql_query('SELECT FOUND_ROWS() as count');
|
||||
$unlim_num_rows = PMA_mysql_result($cnt_all_result,0,'count');
|
||||
}
|
||||
} // end else "just browsing"
|
||||
|
||||
|
Reference in New Issue
Block a user