display a message if an update is required but the record can't be found
This commit is contained in:
@@ -8,7 +8,7 @@ $Source$
|
||||
2001-10-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* release 2.2.1rc2
|
||||
|
||||
2001-10-16 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
2001-10-17 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
* 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<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
* lang/*: cleanup thanks to Bj<42>rn T. Hallberg - Removed unused strings
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user