diff --git a/ChangeLog b/ChangeLog index e7ae5cec8..f24046724 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,7 +8,7 @@ $Source$ 2001-10-17 Marc Delisle * release 2.2.1rc2 -2001-10-16 Loïc Chapeaux +2001-10-17 Loïc Chapeaux * Documentation.html, lines 766-770: added a link to the official MySQL documentation for the "socket error" problems. * index.php3, line 53; lang/*: out-sourced the "no frame" sentence. @@ -17,7 +17,8 @@ $Source$ * tbl_properties.php3, line 1243: added a param. to enforce reloading of the left frame after a flush if $cfgShowTooltip is set to 1. * tbl_change.php3: fixed some inconcistancies if an update is required but - the record can't be found. + the record can't be found and, in this case, ensured a message is + displayed. 2001-10-16 Loïc Chapeaux * lang/*: cleanup thanks to Björn T. Hallberg - Removed unused strings diff --git a/tbl_change.php3 b/tbl_change.php3 index 9dc76a2b1..d1662ebfb 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -43,10 +43,32 @@ if (isset($primary_key)) { $local_query = 'SELECT * FROM ' . backquote($table) . ' WHERE ' . $primary_key; $result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url); $row = mysql_fetch_array($result); + // No row returned if (!$row) { unset($row); unset($primary_key); - } + $goto_cpy = $goto; + $goto = 'tbl_properties.php3' + . '?lang=' . $lang + . '&server=' . $server + . '&db=' . urlencode($db) + . '&table=' . urlencode($table) + . '&$show_query=y' + . '&sql_query=' . urlencode($local_query); + unset($goto); + if (isset($sql_query)) { + $sql_query_cpy = $sql_query; + unset($sql_query); + } + $sql_query = $local_query; + show_message($strEmptyResultSet); + $goto = $goto_cpy; + unset($goto_cpy); + if (isset($sql_query_cpy)) { + $sql_query = $sql_query_cpy; + unset($sql_query_cpy); + } + } // end if (no record returned) } else {