本文整理汇总了PHP中fbsql_errno函数的典型用法代码示例。如果您正苦于以下问题:PHP fbsql_errno函数的具体用法?PHP fbsql_errno怎么用?PHP fbsql_errno使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fbsql_errno函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ErrorNo
function ErrorNo()
{
return @fbsql_errno($this->_connectionID);
}
示例2: errorNative
/**
* Gets the DBMS' native error code produced by the last query
*
* @return int the DBMS' error code
*/
function errorNative()
{
return @fbsql_errno($this->connection);
}
示例3: fbsqlRaiseError
/**
* This method is used to communicate an error and invoke error
* callbacks etc. Basically a wrapper for MDB::raiseError
* that checks for native error msgs.
*
* @param integer $errno error code
* @param string $message userinfo message
* @return object a PEAR error object
* @access public
* @see PEAR_Error
*/
function fbsqlRaiseError($errno = NULL, $message = NULL)
{
if ($errno == NULL) {
if ($this->connection) {
$errno = @fbsql_errno($this->connection);
} else {
$errno = @fbsql_errno();
}
}
if ($this->connection) {
$error = @fbsql_errno($this->connection);
} else {
$error = @fbsql_error();
}
return $this->raiseError($this->errorCode($errno), NULL, NULL, $message, $error);
}
示例4: fbsqlRaiseError
/**
* Gather information about an error, then use that info to create a
* DB error object and finally return that object.
*
* @param integer $errno PEAR error number (usually a DB constant) if
* manually raising an error
* @return object DB error object
* @see DB_common::errorCode()
* @see DB_common::raiseError()
*/
function fbsqlRaiseError($errno = null)
{
if ($errno === null) {
$errno = $this->errorCode(fbsql_errno($this->connection));
}
return $this->raiseError($errno, null, null, null, @fbsql_error($this->connection));
}
示例5: errorInfo
/**
* This method is used to collect information about an error
*
* @param integer $error
* @return array
* @access public
*/
function errorInfo($error = null)
{
if ($this->connection) {
$native_code = @fbsql_errno($this->connection);
$native_msg = @fbsql_error($this->connection);
} else {
$native_code = @fbsql_errno();
$native_msg = @fbsql_error();
}
if (null === $error) {
static $ecode_map;
if (empty($ecode_map)) {
$ecode_map = array(22 => MDB2_ERROR_SYNTAX, 85 => MDB2_ERROR_ALREADY_EXISTS, 108 => MDB2_ERROR_SYNTAX, 116 => MDB2_ERROR_NOSUCHTABLE, 124 => MDB2_ERROR_VALUE_COUNT_ON_ROW, 215 => MDB2_ERROR_NOSUCHFIELD, 217 => MDB2_ERROR_INVALID_NUMBER, 226 => MDB2_ERROR_NOSUCHFIELD, 231 => MDB2_ERROR_INVALID, 239 => MDB2_ERROR_TRUNCATED, 251 => MDB2_ERROR_SYNTAX, 266 => MDB2_ERROR_NOT_FOUND, 357 => MDB2_ERROR_CONSTRAINT_NOT_NULL, 358 => MDB2_ERROR_CONSTRAINT, 360 => MDB2_ERROR_CONSTRAINT, 361 => MDB2_ERROR_CONSTRAINT);
}
if (isset($ecode_map[$native_code])) {
$error = $ecode_map[$native_code];
}
}
return array($error, $native_code, $native_msg);
}