show mysql error codes

This commit is contained in:
Garvin Hicking
2003-07-29 10:20:51 +00:00
parent 914ad7ae12
commit 66279a58c8
3 changed files with 13 additions and 5 deletions

View File

@@ -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 <lem9@users.sourceforge.net>
* serbian: big update,

View File

@@ -465,9 +465,10 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
. $error_message . "\n"
. '</pre>' . "\n";
echo PMA_showMySQLDocu('Error-returns', 'Error-returns');
if (!empty($back_url) && $exit) {
echo '<a href="' . $back_url . '">' . $GLOBALS['strBack'] . '</a>';
echo '&nbsp;&middot;&nbsp;[<a href="' . $back_url . '">' . $GLOBALS['strBack'] . '</a>]';
}
echo "\n";

View File

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