当前位置: 首页>>代码示例>>PHP>>正文


PHP cubrid_errno函数代码示例

本文整理汇总了PHP中cubrid_errno函数的典型用法代码示例。如果您正苦于以下问题:PHP cubrid_errno函数的具体用法?PHP cubrid_errno怎么用?PHP cubrid_errno使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cubrid_errno函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _error_number

 /**
  * The error message number
  *
  * @access	private
  * @return	integer
  */
 function _error_number()
 {
     return cubrid_errno($this->conn_id);
 }
开发者ID:pravinhirmukhe,项目名称:punelic,代码行数:10,代码来源:cubrid_driver.php

示例2: get_db_error_message

 /**
  * Retrieve error messages from the database
  *
  * @return string
  */
 protected function get_db_error_message()
 {
     if (substr(CI_VERSION, 0, 1) != '2') {
         $error = $this->db->error();
         return isset($error['message']) ? $error['message'] : '';
     }
     switch ($this->db->platform()) {
         case 'cubrid':
             return cubrid_errno($this->db->conn_id);
         case 'mssql':
             return mssql_get_last_message();
         case 'mysql':
             return mysql_error($this->db->conn_id);
         case 'mysqli':
             return mysqli_error($this->db->conn_id);
         case 'oci8':
             // If the error was during connection, no conn_id should be passed
             $error = is_resource($this->db->conn_id) ? oci_error($this->db->conn_id) : oci_error();
             return $error['message'];
         case 'odbc':
             return odbc_errormsg($this->db->conn_id);
         case 'pdo':
             $error_array = $this->db->conn_id->errorInfo();
             return $error_array[2];
         case 'postgre':
             return pg_last_error($this->db->conn_id);
         case 'sqlite':
             return sqlite_error_string(sqlite_last_error($this->db->conn_id));
         case 'sqlsrv':
             $error = array_shift(sqlsrv_errors());
             return !empty($error['message']) ? $error['message'] : null;
         default:
             // !WARNING! $this->db->_error_message() is supposed to be private
             // and possibly won't be available in future versions of CI.
             return $this->db->_error_message();
     }
 }
开发者ID:magicjoey,项目名称:Bonfire,代码行数:42,代码来源:BF_Model.php

示例3: error

 /**
  * Error
  *
  * Returns an array containing code and message of the last
  * database error that has occured.
  *
  * @return	array
  */
 public function error()
 {
     return array('code' => cubrid_errno($this->conn_id), 'message' => cubrid_error($this->conn_id));
 }
开发者ID:heruprambadi,项目名称:sim_penyuratan,代码行数:12,代码来源:cubrid_driver.php

示例4: get_db_error_message

 /**
  * Allows you to retrieve error messages from the database
  *
  * @return string
  */
 public function get_db_error_message($db_type)
 {
     switch ($this->{$db_type}->platform()) {
         case 'cubrid':
             return cubrid_errno($this->{$db_type}->conn_id);
         case 'mssql':
             return mssql_get_last_message();
         case 'mysql':
             return mysql_error($this->{$db_type}->conn_id);
         case 'mysqli':
             return mysqli_error($this->{$db_type}->conn_id);
         case 'oci8':
             // If the error was during connection, no conn_id should be passed
             $error = is_resource($this->{$db_type}->conn_id) ? oci_error($this->{$db_type}->conn_id) : oci_error();
             return $error['message'];
         case 'odbc':
             return odbc_errormsg($this->{$db_type}->conn_id);
         case 'pdo':
             $error_array = $this->{$db_type}->conn_id->errorInfo();
             return $error_array[2];
         case 'postgre':
             return pg_last_error($this->{$db_type}->conn_id);
         case 'sqlite':
             return sqlite_error_string(sqlite_last_error($this->{$db_type}->conn_id));
         case 'sqlsrv':
             $error = array_shift(sqlsrv_errors());
             return !empty($error['message']) ? $error['message'] : null;
         default:
             /*
              * !WARNING! $this->{$db_type}->_error_message() is supposed to be private and
              * possibly won't be available in future versions of CI
              */
             return $this->{$db_type}->_error_message();
     }
 }
开发者ID:NaszvadiG,项目名称:my_model,代码行数:40,代码来源:MY_Model.php


注:本文中的cubrid_errno函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。