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


PHP ibase_errmsg函数代码示例

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


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

示例1: updateError

 function updateError($location)
 {
     //$this->errorNumber = mysql_errno();
     $this->errorMessage = ibase_errmsg();
     $this->errorLocation = $location;
     if ($this->errorNumber && $this->show_error_messages) {
         echo '<br /><b>' . $this->errorLocation . '</b><br />' . $this->errorMessage;
         flush();
     }
 }
开发者ID:shoaibali,项目名称:ispconfig3,代码行数:10,代码来源:db_firebird.inc.php

示例2: query

 function query($query, $unbuffered = false)
 {
     $result = ibase_query($query, $this->_link);
     if (!$result) {
         $this->errno = ibase_errcode();
         $this->error = ibase_errmsg();
         return false;
     }
     $this->error = "";
     if ($result === true) {
         $this->affected_rows = ibase_affected_rows($this->_link);
         return true;
     }
     return new Min_Result($result);
 }
开发者ID:tlandn,项目名称:akvo-sites-zz-template,代码行数:15,代码来源:firebird.inc.php

示例3: __construct

 /**
  * This function initializes the class.
  *
  * @access public
  * @override
  * @param DB_Connection_Driver $connection  the connection to be used
  * @param string $sql                       the SQL statement to be queried
  * @param integer $mode                     the execution mode to be used
  * @throws Throwable_SQL_Exception          indicates that the query failed
  */
 public function __construct(DB_Connection_Driver $connection, $sql, $mode = NULL)
 {
     $this->resource = $connection->get_resource();
     $command = @ibase_query($this->resource, $sql);
     if ($command === FALSE) {
         throw new Throwable_SQL_Exception('Message: Failed to query SQL statement. Reason: :reason', array(':reason' => @ibase_errmsg()));
     }
     $this->command = $command;
     $this->record = FALSE;
     $this->blobs = array();
     $count = (int) @ibase_num_fields($command);
     for ($i = 0; $i < $count; $i++) {
         $field = ibase_field_info($command, $i);
         if ($field['type'] == 'BLOB') {
             $this->blobs[] = $field['name'];
         }
     }
 }
开发者ID:ruslankus,项目名称:invoice-crm,代码行数:28,代码来源:Standard.php

示例4: dbQuery

function dbQuery($query, $show_errors = true, $all_results = true, $show_output = true)
{
    if ($show_errors) {
        error_reporting(E_ALL);
    } else {
        error_reporting(E_PARSE);
    }
    // Connect to the Firebird/Interbase Sybase database management system
    $link = ibase_pconnect("/var/www/sqlmap/dbs/firebird/testdb.fdb", "SYSDBA", "testpass");
    if (!$link) {
        die(ibase_errmsg());
    }
    // Print results in HTML
    print "<html><body>\n";
    // Print SQL query to test sqlmap '--string' command line option
    //print "<b>SQL query:</b> " . $query . "<br>\n";
    // Perform SQL injection affected query
    $result = ibase_query($link, $query);
    if (!$result) {
        if ($show_errors) {
            print "<b>SQL error:</b> " . ibase_errmsg() . "<br>\n";
        }
        exit(1);
    }
    print "<b>SQL results:</b>\n";
    print "<table border=\"1\">\n";
    while ($line = ibase_fetch_assoc($result)) {
        // This must stay here for Firebird
        if (!$show_output) {
            exit(1);
        }
        print "<tr>";
        foreach ($line as $col_value) {
            print "<td>" . $col_value . "</td>";
        }
        print "</tr>\n";
        if (!$all_results) {
            break;
        }
    }
    print "</table>\n";
    print "</body></html>";
}
开发者ID:dieface,项目名称:testenv,代码行数:43,代码来源:firebird.inc.php

示例5: execute

 public function execute($sql, array $data = null)
 {
     $this->connect();
     if (!is_array($data)) {
         $data = array();
     }
     $data = array_values($data);
     foreach ($data as $i => $v) {
         switch (gettype($v)) {
             case 'boolean':
             case 'integer':
                 $data[$i] = (int) $v;
                 break;
             case 'array':
                 $data[$i] = implode(',', $v);
                 break;
             case 'object':
                 $data[$i] = serialize($data[$i]);
                 break;
             case 'resource':
                 if (is_resource($v) && get_resource_type($v) === 'stream') {
                     $data[$i] = stream_get_contents($data[$i]);
                 } else {
                     $data[$i] = serialize($data[$i]);
                 }
                 break;
         }
     }
     array_unshift($data, $sql);
     $temp = call_user_func_array("\\ibase_execute", $data);
     if (!$temp) {
         throw new DatabaseException('Could not execute query : ' . \ibase_errmsg() . ' <' . $sql . '>');
     }
     $this->aff = \ibase_affected_rows($this->lnk);
     return $temp;
 }
开发者ID:vakata,项目名称:database,代码行数:36,代码来源:Ibase.php

示例6: _setDbError

 function _setDbError($query)
 {
     return $this->_setLastError(ibase_errcode(), ibase_errmsg(), $query);
 }
开发者ID:saqar,项目名称:tc_aowow,代码行数:4,代码来源:Ibase.php

示例7: fetch

 /**
  * Fetches the row at current position and moves the internal cursor to the next position.
  * @param  bool     TRUE for associative array, FALSE for numeric
  * @return array    array on success, nonarray if no next record
  */
 public function fetch($assoc)
 {
     DibiDriverException::tryError();
     $result = $assoc ? ibase_fetch_assoc($this->resultSet, IBASE_TEXT) : ibase_fetch_row($this->resultSet, IBASE_TEXT);
     // intentionally @
     if (DibiDriverException::catchError($msg)) {
         if (ibase_errcode() == self::ERROR_EXCEPTION_THROWN) {
             preg_match('/exception (\\d+) (\\w+) (.*)/is', ibase_errmsg(), $match);
             throw new DibiProcedureException($match[3], $match[1], $match[2], dibi::$sql);
         } else {
             throw new DibiDriverException($msg, ibase_errcode(), dibi::$sql);
         }
     }
     return $result;
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:20,代码来源:DibiFirebirdDriver.php

示例8: error

 /**
 +----------------------------------------------------------
 * 数据库错误信息
 * 并显示当前的SQL语句
 +----------------------------------------------------------
 * @access public
 +----------------------------------------------------------
 * @return string
 +----------------------------------------------------------
 * @throws ThinkExecption
 +----------------------------------------------------------
 */
 public function error()
 {
     $this->error = ibase_errmsg();
     if ($this->debug && '' != $this->queryStr) {
         $this->error .= "\n [ SQL语句 ] : " . $this->queryStr;
     }
     return $this->error;
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:20,代码来源:DbIbase.class.php

示例9: _execute

 /**
  * Executes a prepared statement.
  *
  * @param array $params OPTIONAL Values to bind to parameter placeholders.
  * @return bool
  * @throws ZendX_Db_Statement_Firebird_Exception
  */
 public function _execute(array $params = null)
 {
     if (!$this->_stmtPrepared) {
         return false;
     }
     // if no params were given as an argument to execute(),
     // then default to the _bindParam array
     if ($params === null) {
         $params = $this->_bindParam;
     }
     // send $params as input parameters to the statement
     if ($params) {
         array_unshift($params, $this->_stmtPrepared);
         $retval = @call_user_func_array('ibase_execute', $params);
     } else {
         // execute the statement
         $retval = @ibase_execute($this->_stmtPrepared);
     }
     $this->_stmtResult = $retval;
     if ($retval === false) {
         $last_error = ibase_errmsg();
         $this->_stmtRowCount = 0;
     }
     //Firebird php ibase extension, auto-commit is not after each call, but at
     //end of script. Disabled when transaction is active
     if (!$this->_adapter->getTransaction()) {
         ibase_commit_ret();
     }
     if ($retval === false) {
         /**
          * @see ZendX_Db_Statement_Firebird_Exception
          */
         require_once 'ZendX/Db/Statement/Firebird/Exception.php';
         throw new ZendX_Db_Statement_Firebird_Exception("Firebird statement execute error : " . $last_error);
     }
     // statements that have no result set do not return metadata
     if (is_resource($this->_stmtResult)) {
         // get the column names that will result
         $this->_keys = array();
         $coln = ibase_num_fields($this->_stmtResult);
         $this->_stmtColumnCount = $coln;
         for ($i = 0; $i < $coln; $i++) {
             $col_info = ibase_field_info($this->_stmtResult, $i);
             $this->_keys[] = $this->_adapter->foldCase($col_info['name']);
         }
         // set up a binding space for result variables
         $this->_values = array_fill(0, count($this->_keys), null);
         // set up references to the result binding space.
         // just passing $this->_values in the call_user_func_array()
         // below won't work, you need references.
         $refs = array();
         foreach ($this->_values as $i => &$f) {
             $refs[$i] =& $f;
         }
     }
     if ($trans = $this->_adapter->getTransaction()) {
         $this->_stmtRowCount = ibase_affected_rows($trans);
     } else {
         $this->_stmtRowCount = ibase_affected_rows($this->_adapter->getConnection());
     }
     return true;
 }
开发者ID:JosefinaArayaTapia,项目名称:Capicua-Restobar,代码行数:69,代码来源:Firebird_3.php

示例10: _handleerror

 function _handleerror()
 {
     $this->_errorMsg = ibase_errmsg();
 }
开发者ID:kractos26,项目名称:orfeo,代码行数:4,代码来源:adodb-ibase.inc.php

示例11: query

 /**
  *@package db_firebird
  *@method query()
  *@desc Send a Firebird/Interbase query
  *@since v0.3.1
  *@return bool & Populates $this->resource
  * */
 public function query($query)
 {
     $this->sql_query = $query;
     if ($this->resource = ibase_query($query)) {
         return TRUE;
     } else {
         // is hanled error
         $error_no = ibase_errcode();
         $is_handed = false;
         if (array_key_exists($error_no, $this->arr_handled_errors)) {
             $is_handed = true;
         }
         if ($is_handed == true) {
             $this->error_code = $this->arr_handled_errors[$error_no];
             return FALSE;
         } else {
             // if uknown error
             try {
                 throw new FkException("Firebird/Interbase Error");
             } catch (FkException $e) {
                 $e->description = 'Firebird/Interbase Respondi&oacute;:' . ibase_errmsg() . '</b>';
                 $e->solution = 'Verifique la consulta';
                 $e->solution_code = fk_str_format($query, 'html');
                 $e->error_code = $error_no;
                 $e->show('code_help');
             }
             return FALSE;
         }
     }
     // End else
 }
开发者ID:mmendoza000,项目名称:freekore,代码行数:38,代码来源:db_firebird.php

示例12: 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' => ibase_errcode(), 'message' => ibase_errmsg());
 }
开发者ID:aldsdelram,项目名称:PUPNLPWebsite,代码行数:12,代码来源:ibase_driver.php

示例13: RollbackTransaction

 function RollbackTransaction()
 {
     $this->Debug("Rollback Transaction");
     if ($this->auto_commit) {
         return $this->SetError("Rollback transaction", "transactions can not be rolled back when changes are auto commited");
     }
     if ($this->transaction_id && !ibase_rollback($this->transaction_id)) {
         return $this->SetError("Rollback transaction", "Could not rollback a pending transaction: " . ibase_errmsg());
     }
     if (!($this->transaction_id = ibase_trans(IBASE_COMMITTED, $this->connection))) {
         return $this->SetError("Rollback transaction", "Could start a new transaction: " . ibase_errmsg());
     }
     return 1;
 }
开发者ID:BackupTheBerlios,项目名称:zvs,代码行数:14,代码来源:metabase_ibase.php

示例14: error

 /**
  * Devuelve el error de Firebird
  *
  * @return string
  */
 public function error($err = '')
 {
     if (!$this->id_connection) {
         $this->last_error = ibase_errmsg() ? ibase_errmsg() : "[Error Desconocido en Firebird: {$err}]";
         if ($this->logger) {
             Logger::error($this->last_error);
         }
         return $this->last_error;
     }
     $this->last_error = ibase_errmsg() ? ibase_errmsg() : "[Error Desconocido en Firebird: {$err}]";
     $this->last_error .= $err;
     if ($this->logger) {
         Logger::error($this->last_error);
     }
     return $this->last_error;
 }
开发者ID:slrondon,项目名称:MikrotikCenter,代码行数:21,代码来源:firebird.php

示例15: _sql_error

 /**
  * return sql error array
  * @access private
  */
 function _sql_error()
 {
     return array('message' => @ibase_errmsg(), 'code' => @function_exists('ibase_errcode') ? @ibase_errcode() : '');
 }
开发者ID:BACKUPLIB,项目名称:mwenhanced,代码行数:8,代码来源:firebird.php


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