diff --git a/ChangeLog b/ChangeLog index f18116ed4..79d941570 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-08-01 Marc Delisle + * tbl_select.php3: bug 697979, implemented a suggestion by + Joerg Klein (j0erch) to do a SELECT * when all fields were selected + on the Select page, to avoid (in most cases) a IE limitation + 2003-08-01 Alexander M. Turek * main.php3: Added link to charset page. * libraries/mysql_charsets.lib.php3, lang/*.inc.php3: More detailed charset diff --git a/tbl_select.php3 b/tbl_select.php3 index a236d0c15..8eb946261 100755 --- a/tbl_select.php3 +++ b/tbl_select.php3 @@ -10,7 +10,6 @@ require('./libraries/grab_globals.lib.php3'); require('./libraries/common.lib.php3'); require('./libraries/relation.lib.php3'); // foreign keys - /** * Defines arrays of functions (should possibly be in config.inc.php3 * so it can also be used in tbl_qbe.php3) @@ -20,7 +19,6 @@ require('./libraries/relation.lib.php3'); // foreign keys $numfunctions = array('=', '>', '>=', '<', '<=', '!=', 'LIKE'); $textfunctions = array('LIKE', '=', '!='); - /** * Not selection yet required -> displays the selection form */ @@ -204,6 +202,7 @@ if (!isset($param) || $param[0] == '') {      + 0) { - $sql_query .= ',' . PMA_backquote(urldecode($param[$i])); + + $sql_query = 'SELECT '; + + // if all fields were selected to display, we do a SELECT * + // (more efficient and this helps prevent a problem in IE + // if one of the rows is edited and we come back to the Select results) + + if (count($param) == $max_number_of_fields) { + $sql_query .= '* '; + } else { + + $sql_query .= PMA_backquote(urldecode($param[0])); + $i = 0; + $c = count($param); + while ($i < $c) { + if ($i > 0) { + $sql_query .= ',' . PMA_backquote(urldecode($param[$i])); + } + $i++; } - $i++; - } + } // end if + $sql_query .= ' FROM ' . PMA_backquote($table); // The where clause if ($where != '') {