fbsql_errno

(PHP 4 >= 4.0.6, PHP 5, PHP 7)

fbsql_errnoReturns the error number from previous operation

说明

fbsql_errno ([ resource $link_identifier ] ) : int

Returns the numerical value of the error message from previous FrontBase operation.

Errors coming back from the fbsql database backend don't issue warnings. Instead, use fbsql_errno() to retrieve the error code. Note that this function only returns the error code from the most recently executed fbsql function (not including fbsql_error() and fbsql_errno()), so if you want to use it, make sure you check the value before calling another fbsql function.

参数

link_identifier

fbsql_connect()fbsql_pconnect() 返回的 FrontBase 链接标识符.

如可选并未指定,函数会尝试查找一个到 FrontBase 服务器的开放链接,且如没有找到这样的链接,会尝试通过不带参数调用 fbsql_connect() 来创建一个。

返回值

Returns the error number from the last fbsql function, or 0 (zero) if no error occurred.

范例

Example #1 fbsql_errno() Example

<?php
fbsql_connect
("marliesle");
echo 
fbsql_errno() . ": " fbsql_error() . "<br />";
fbsql_select_db("nonexistentdb");
echo 
fbsql_errno() . ": " fbsql_error() . "<br />";
$conn fbsql_query("SELECT * FROM nonexistenttable;");
echo 
fbsql_errno() . ": " fbsql_error() . "<br />";
?>

参见

相关文章
php cubrid mysql 兼容性函数 return the numerical value of the error message from previous cubrid operationphp frontbase 函数 get number of affected rows in previous frontbase operationphp frontbase 函数 returns the error number from previous operationphp frontbase 函数 returns the error message from previous operationphp frontbase 函数 get the id generated from the previous insert operationphp informix 函数 returns error message of last informix callphp ldap 函数 convert ldap error number into string error messagephp maxdb 函数 gets the number of affected rows in a previous maxdb operationphp maxdb 函数 returns the error code from last connect callphp maxdb 函数 returns the sqlstate error from previous maxdb operationphp maxdb 函数 returns the total number of rows changed deleted or inserted by the last executed statementphp maxdb 函数 returns sqlstate error from previous statement operationphp maxdb 函数 returns the number of warnings from the last query for the given linkphp session pgsql 函数 returns number of errors and last error messagephp sqlsrv 函数 returns error and warning information about the last sqlsrv operation performedphp yaz 函数 returns error numberphp yp/nis 函数 returns the error code of the previous operationphp mysqli stmt returns sqlstate error from previous statement operationphp mysqlnduhconnection returns the sqlstate error from previous mysql operationphp solrquery returns the maximum number of characters from a field when using the regex fragmenter
关注编程学问公众号