diff --git a/ChangeLog b/ChangeLog index 1d18f9f3c343..7f51555b5247 100755 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,8 @@ $Source$ move table comments to header and enable configuration of header for TRUE/FALSE/'both', thanks to Sebastian Mendel - cybot_tm * db_details.php: undefined $header_url_qry + * sql.php: bug #1255869, "MySQL returned an empty result set" not + displayed in all cases 2005-08-09 Marc Delisle * read_dump.php: add unique numbers to $strFileCouldNotBeRead to diff --git a/sql.php b/sql.php index e781ad2415cd..03c33f61836d 100644 --- a/sql.php +++ b/sql.php @@ -610,7 +610,6 @@ } // end if column PMA_* purge } // end else "didn't ask to see php code" - // No rows returned -> move back to the calling page if ($num_rows < 1 || $is_affected) { if ($is_delete) { @@ -624,7 +623,16 @@ } } else if ($is_affected) { $message = $strAffectedRows . ' ' . $num_rows; - } else if (!empty($zero_rows)) { + + // Ok, here is an explanation for the !$is_select. + // The form generated + // by tbl_query_box.php and db_details.php has many submit buttons + // on the same form, and some confusion arises from the + // fact that $zero_rows is sent for every case. + // The $zero_rows containing $strSuccess and sent with + // the form should not have priority over + // errors like $strEmptyResultSet + } else if (!empty($zero_rows) && !$is_select) { $message = $zero_rows; } else if (!empty($GLOBALS['show_as_php'])) { $message = $strPhp;