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


PHP sybase_unbuffered_query函数代码示例

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


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

示例1: _query

 function _query($sql, $inputarr = false)
 {
     global $ADODB_COUNTRECS;
     if ($ADODB_COUNTRECS == false && ADODB_PHPVER >= 0x4300) {
         return sybase_unbuffered_query($sql, $this->_connectionID);
     } else {
         return sybase_query($sql, $this->_connectionID);
     }
 }
开发者ID:ceryxSeidor,项目名称:ProyectoPruebaWSV2,代码行数:9,代码来源:adodb-sybase.inc.php

示例2: query0

 /**
  * Execute any statement
  *
  * @param   string sql
  * @param   bool buffered default TRUE
  * @return  rdbms.sybase.SybaseResultSet or TRUE if no resultset was created
  * @throws  rdbms.SQLException
  */
 protected function query0($sql, $buffered = TRUE)
 {
     if (!is_resource($this->handle)) {
         if (!($this->flags & DB_AUTOCONNECT)) {
             throw new SQLStateException('Not connected');
         }
         $c = $this->connect();
         // Check for subsequent connection errors
         if (FALSE === $c) {
             throw new SQLStateException('Previously failed to connect');
         }
     }
     if (!$buffered) {
         $result = @sybase_unbuffered_query($sql, $this->handle, FALSE);
     } else {
         if ($this->flags & DB_UNBUFFERED) {
             $result = @sybase_unbuffered_query($sql, $this->handle, $this->flags & DB_STORE_RESULT);
         } else {
             $result = @sybase_query($sql, $this->handle);
         }
     }
     if (FALSE === $result) {
         $message = 'Statement failed: ' . trim(sybase_get_last_message()) . ' @ ' . $this->dsn->getHost();
         if (!is_resource($error = sybase_query('select @@error', $this->handle))) {
             // The only case selecting @@error should fail is if we receive a
             // disconnect. We could also check on the warnings stack if we can
             // find the following:
             //
             // Sybase:  Client message:  Read from SQL server failed. (severity 78)
             //
             // but that seems a bit errorprone.
             throw new SQLConnectionClosedException($message, $sql);
         }
         $code = current(sybase_fetch_row($error));
         switch ($code) {
             case 1205:
                 // Deadlock
                 throw new SQLDeadlockException($message, $sql, $code);
             default:
                 // Other error
                 throw new SQLStatementFailedException($message, $sql, $code);
         }
     }
     return TRUE === $result ? $result : new SybaseResultSet($result, $this->tz);
 }
开发者ID:Gamepay,项目名称:xp-framework,代码行数:53,代码来源:SybaseConnection.class.php


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