Skip to content

Commit

Permalink
bug #1255869, 'MySQL returned an empty result set' not displayed in a…
Browse files Browse the repository at this point in the history
…ll cases
  • Loading branch information
Marc Delisle committed Aug 12, 2005
1 parent 58c1b9a commit 2050d44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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 <lem9@users.sourceforge.net>
* read_dump.php: add unique numbers to $strFileCouldNotBeRead to
Expand Down
12 changes: 10 additions & 2 deletions sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -624,7 +623,16 @@
}
} else if ($is_affected) {
$message = $strAffectedRows . '&nbsp;' . $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;
Expand Down

0 comments on commit 2050d44

Please sign in to comment.