display a message if an update is required but the record can't be found

This commit is contained in:
Loïc Chapeaux
2001-10-17 18:47:44 +00:00
parent f20ff93945
commit acc961cb3a
2 changed files with 26 additions and 3 deletions

View File

@@ -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
{