int mysql_errno
(int [link_identifier]
);mySQL データベースバックエンドから返ってくるエラーは、 警告を発生しません。代わりにエラー番号を得るためにこれらの関数を 使用して下さい。
<?php mysql_connect("marliesle"); echo mysql_errno().": ".mysql_error()."<BR>"; mysql_select_db("nonexistentdb"); echo mysql_errno().": ".mysql_error()."<BR>"; $conn = mysql_query("SELECT * FROM nonexistenttable"); echo mysql_errno().": ".mysql_error()."<BR>"; ?>
mysql_error も参照下さい。