Patch from Laurent Haas that allows to remember and modify a sql query submitted

This commit is contained in:
Loïc Chapeaux
2001-07-20 02:02:07 +00:00
parent 7d5c43d1f4
commit f246345b4f
3 changed files with 14 additions and 5 deletions

View File

@@ -108,7 +108,8 @@ function mysql_die($error = "") {
echo "<b> $strError </b><p>";
if(isset($sql_query) && !empty($sql_query))
{
echo "$strSQLQuery: <pre>".htmlspecialchars($sql_query)."</pre><p>";
$edit_link=sprintf("<a href='db_details.php3?server=%s&lang=%s&db=%s&sql_query=%s'>%s</a>",$GLOBALS['server'],$GLOBALS['lang'],$GLOBALS['db'],urlencode($sql_query),$GLOBALS['strEdit']);
echo "$strSQLQuery: <pre>".$edit_link.htmlspecialchars($sql_query)."</pre><p>";
}
if(empty($error))
echo "$strMySQLSaid ".mysql_error();
@@ -943,7 +944,8 @@ function show_message($message)
$new_line = '<br />' . "\n" . ' ';
$query_base = htmlspecialchars($GLOBALS['sql_query']);
$query_base = ereg_replace("(\015\012)|(\015)|(\012)", $new_line, $query_base);
echo ' ' . $query_base;
$edit_link=sprintf("<a href='db_details.php3?server=%s&lang=%s&db=%s&sql_query=%s'>%s</a>",$GLOBALS['server'],$GLOBALS['lang'],$GLOBALS['db'],urlencode($GLOBALS['sql_query']),$GLOBALS['strEdit']);
echo ' ' . $edit_link.'&nbsp;'.$query_base;
if (isset($GLOBALS['sql_order'])) {
echo ' ' . $GLOBALS['sql_order'];
}