diff --git a/ChangeLog b/ChangeLog index c68ac7568..07cade945 100755 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,9 @@ $Source$ of each query of a multi-query statement (taking some maximum line/pieces amounts into account) o changed formatting of syntax_comment to include some space + * libraries/common.lib.php3, libaries/mysql_wrappers.lib.php3: + Display MySQL error code and link to the MySQL-Documentation of + error codes 2003-07-29 Marc Delisle * serbian: big update, diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index f32984f60..b3a5ac8d0 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -465,9 +465,10 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} . $error_message . "\n" . '' . "\n"; - + echo PMA_showMySQLDocu('Error-returns', 'Error-returns'); + if (!empty($back_url) && $exit) { - echo '' . $GLOBALS['strBack'] . ''; + echo ' · [' . $GLOBALS['strBack'] . ']'; } echo "\n"; diff --git a/libraries/mysql_wrappers.lib.php3 b/libraries/mysql_wrappers.lib.php3 index d66228e98..e87cc3c65 100644 --- a/libraries/mysql_wrappers.lib.php3 +++ b/libraries/mysql_wrappers.lib.php3 @@ -23,10 +23,14 @@ if (!defined('PMA_MYSQL_WRAPPERS_LIB_INCLUDED')){ function PMA_mysql_error($id = FALSE) { if ($id != FALSE) { - return PMA_convert_display_charset(mysql_error($id)); - } else { - return PMA_convert_display_charset(mysql_error()); + if (mysql_errno($id) != 0) { + return PMA_convert_display_charset('#' . mysql_errno($id) . ' - ' . mysql_error($id)); + } + } elseif (mysql_errno() != 0) { + return PMA_convert_display_charset('#' . mysql_errno() . ' - ' . mysql_error()); } + + return FALSE; } function PMA_mysql_fetch_array($result, $type = FALSE) {