diff --git a/ChangeLog b/ChangeLog index cc0328f41..6b82f56a9 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ $Source$ 2004-10-19 Michal Čihař * export.php: Use just \n for SQL exports (bug #1042521). * libraries/read_dump.lib.php: Set correct return value (bug #1048861). + * sql.php: Fix undefined index. 2004-10-17 Marc Delisle * lang/turkish update, thanks to boralioglu. diff --git a/sql.php b/sql.php index a4b0a1e8e..f302ce1fd 100644 --- a/sql.php +++ b/sql.php @@ -208,7 +208,7 @@ if ($do_confirm) { if($cfg['ErrorIconic']){ echo ' '; } - echo $strDropDatabaseStrongWarning . ' 
' . "\n"; + echo $strDropDatabaseStrongWarning . ' 
' . "\n"; } else { echo ' ' . "\n" . ' ' . "\n"; @@ -527,14 +527,14 @@ else { } else { PMA_DBI_try_query($count_query); // if (mysql_error()) { - // void. + // void. // I tried the case // (SELECT `User`, `Host`, `Db`, `Select_priv` FROM `db`) // UNION (SELECT `User`, `Host`, "%" AS "Db", // `Select_priv` // FROM `user`) ORDER BY `User`, `Host`, `Db`; // and although the generated count_query is wrong - // the SELECT FOUND_ROWS() work! (maybe it gets the + // the SELECT FOUND_ROWS() work! (maybe it gets the // count from the latest query that worked) // // another case where the count_query is wrong: @@ -750,7 +750,7 @@ else { echo ' ' . "\n" . ' ' + . '" target="print_view">' . ($cfg['PropertiesIconic'] ? '' . $strPrintView . '' : '') . $strPrintView . '' . "\n"; if (!$dontlimitchars) { @@ -770,7 +770,7 @@ else { // (the url_query has extra parameters that won't be used to export) // (the single_table parameter is used in display_export.lib.php // to hide the SQL and the structure export dialogs) - if ($analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview)) { + if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview)) { if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && !isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) { $single_table = '&single_table=true'; } else { @@ -780,7 +780,7 @@ else { . '   ' + . '">' . ($cfg['PropertiesIconic'] ? '' . $strExport . '' : '') . $strExport . '' . "\n"; }