Original MySQL API (
Mysql
)
2256
Notes
Warning
This function will not be available if the MySQL extension was built against a
MySQL 4.x client library.
Note
For backward compatibility, the following deprecated alias may be used:
mysql_dropdb
See Also
mysql_query
20.7.2.5.10.
mysql_errno
Copyright 1997-2012 the PHP Documentation Group. [2230]
•
mysql_errno
Returns the numerical value of the error message from previous MySQL operation
Warning
This extension is deprecated as of PHP 5.5.0, and will be removed in the
future. Instead, the
MySQLi
or
PDO_MySQL
extension should be used. See
also
MySQL: choosing an API
guide and
related FAQ
for more information.
Alternatives to this function include:
mysqli_errno
PDO::errorCode
Description
int mysql_errno(
resource link_identifier
= =NULL);
Returns the error number from the last MySQL function.
Errors coming back from the MySQL database backend no longer issue warnings. Instead, use
mysql_errno
to retrieve the error code. Note that this function only returns the error code from the
most recently executed MySQL function (not including
mysql_error
and
mysql_errno
), so if you
want to use it, make sure you check the value before calling another MySQL function.
Parameters
link_identifier
The MySQL connection. If the link identifier is not specified, the
last link opened by
mysql_connect
is assumed. If no such link
is found, it will try to create one as if
mysql_connect
was called
with no arguments. If no connection is found or established, an
E_WARNING
level error is generated.
Return Values
Returns the error number from the last MySQL function, or
0
(zero) if no error occurred.
Examples
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...