CI_DB_mysqli_driver::error PHP Method

error() public method

Returns an array containing code and message of the last database error that has occurred.
public error ( ) : array
return array
    public function error()
    {
        if (!empty($this->_mysqli->connect_errno)) {
            return array('code' => $this->_mysqli->connect_errno, 'message' => is_php('5.2.9') ? $this->_mysqli->connect_error : mysqli_connect_error());
        }
        return array('code' => $this->conn_id->errno, 'message' => $this->conn_id->error);
    }