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 of each query of a multi-query statement (taking some maximum
line/pieces amounts into account) line/pieces amounts into account)
o changed formatting of syntax_comment to include some space 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> 2003-07-29 Marc Delisle <lem9@users.sourceforge.net>
* serbian: big update, * serbian: big update,

View File

@@ -465,9 +465,10 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
. $error_message . "\n" . $error_message . "\n"
. '</pre>' . "\n"; . '</pre>' . "\n";
echo PMA_showMySQLDocu('Error-returns', 'Error-returns');
if (!empty($back_url) && $exit) { 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"; echo "\n";

View File

@@ -23,10 +23,14 @@ if (!defined('PMA_MYSQL_WRAPPERS_LIB_INCLUDED')){
function PMA_mysql_error($id = FALSE) { function PMA_mysql_error($id = FALSE) {
if ($id != FALSE) { if ($id != FALSE) {
return PMA_convert_display_charset(mysql_error($id)); if (mysql_errno($id) != 0) {
} else { return PMA_convert_display_charset('#' . mysql_errno($id) . ' - ' . mysql_error($id));
return PMA_convert_display_charset(mysql_error()); }
} elseif (mysql_errno() != 0) {
return PMA_convert_display_charset('#' . mysql_errno() . ' - ' . mysql_error());
} }
return FALSE;
} }
function PMA_mysql_fetch_array($result, $type = FALSE) { function PMA_mysql_fetch_array($result, $type = FALSE) {