mysql_errnoPHP ManualPrevNextmysql_errnomysql_errno -- Returns the number of the error message from previous
MySQL operationDescriptionint mysql_errno(int
[link_identifier]
);
Errors coming back from the mySQL database backend no longer
issue warnings. Instead, use these functions to retrieve the
error number.
1
2 <?php
3 mysql_connect("marliesle");
4 echo mysql_errno().": ".mysql_error()."<BR>";
5 mysql_select_db("nonexistentdb");
6 echo mysql_errno().": ".mysql_error()."<BR>";
7 $conn = mysql_query("SELECT * FROM nonexistenttable");
8 echo mysql_errno().": ".mysql_error()."<BR>";
9 ?>
10
See also: mysql_error()
PrevHomeNextmysql_drop_dbUpmysql_error
Wyszukiwarka