當前位置: 首頁>>代碼示例>>PHP>>正文


PHP sybase_affected_rows函數代碼示例

本文整理匯總了PHP中sybase_affected_rows函數的典型用法代碼示例。如果您正苦於以下問題:PHP sybase_affected_rows函數的具體用法?PHP sybase_affected_rows怎麽用?PHP sybase_affected_rows使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了sybase_affected_rows函數的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: exec

 public function exec(&$statement)
 {
     if ($result = @sybase_query($statement, $this->link)) {
         if (is_resource($result)) {
             sybase_free_result($result);
             return 0;
         }
         return sybase_affected_rows($this->link);
     }
     return false;
 }
開發者ID:Deepab23,項目名稱:clinic,代碼行數:11,代碼來源:sybase.php

示例2: affectedRows

 /**
  * Determines the number of rows affected by a data maniuplation query
  *
  * 0 is returned for queries that don't manipulate data.
  *
  * @return int  the number of rows.  A DB_Error object on failure.
  */
 function affectedRows()
 {
     if (DB::isManip($this->last_query)) {
         $result = @sybase_affected_rows($this->connection);
     } else {
         $result = 0;
     }
     return $result;
 }
開發者ID:Cyberspace-Networks,項目名稱:PeopleAggregator,代碼行數:16,代碼來源:sybase.php

示例3: lastAffected

 /**
  * Returns number of affected rows in previous database operation. If no previous operation exists,
  * this returns false.
  *
  * @return integer Number of affected rows
  */
 function lastAffected()
 {
     if ($this->_result) {
         return sybase_affected_rows($this->connection);
     }
     return null;
 }
開發者ID:christianallred,項目名稱:fluent_univ,代碼行數:13,代碼來源:dbo_sybase.php

示例4: rowCount

 public function rowCount()
 {
     return sybase_affected_rows($this->_link);
 }
開發者ID:Deepab23,項目名稱:clinic,代碼行數:4,代碼來源:sybase_statement.php

示例5: affectedRows

 /**
  * Determines the number of rows affected by a data maniuplation query
  *
  * 0 is returned for queries that don't manipulate data.
  *
  * @return int  the number of rows.  A DB_Error object on failure.
  */
 function affectedRows()
 {
     if ($this->_last_query_manip) {
         $result = @sybase_affected_rows($this->connection);
     } else {
         $result = 0;
     }
     return $result;
 }
開發者ID:peteainsworth,項目名稱:civicrm-4.2.9-drupal,代碼行數:16,代碼來源:sybase.php

示例6: affected_rows

 /**
  * Affected Rows
  *
  * @access	public
  * @return	integer
  */
 function affected_rows()
 {
     return @sybase_affected_rows($this->conn_id);
 }
開發者ID:belalangkunyit,項目名稱:ci30sybase,代碼行數:10,代碼來源:sybase_driver.php

示例7: affectedRows

 /**
  * Retrieve number of affected rows for last query
  *
  * @return  int
  */
 protected function affectedRows()
 {
     return sybase_affected_rows($this->handle);
 }
開發者ID:Gamepay,項目名稱:xp-framework,代碼行數:9,代碼來源:SybaseConnection.class.php

示例8: affected_rows

 /**
  * Return the number of affected rows
  * @return integer
  */
 protected function affected_rows()
 {
     return @sybase_affected_rows();
 }
開發者ID:jens-wetzel,項目名稱:use2,代碼行數:8,代碼來源:DB_Sybase.php

示例9: affected_rows

 function affected_rows()
 {
     return sybase_affected_rows($this->Query_ID);
 }
開發者ID:antirek,項目名稱:prestige-pbx,代碼行數:4,代碼來源:phplib_sybase.php

示例10: query0

 /**
  * Execute any statement
  *
  * @param   string sql
  * @param   bool buffered default TRUE
  * @return  rdbms.ResultSet
  * @throws  rdbms.SQLException
  */
 protected function query0($sql, $buffered = true)
 {
     if (!is_resource($this->handle)) {
         if (!($this->flags & DB_AUTOCONNECT)) {
             throw new \rdbms\SQLStateException('Not connected');
         }
         $c = $this->connect();
         // Check for subsequent connection errors
         if (false === $c) {
             throw new \rdbms\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 \rdbms\SQLConnectionClosedException($message, $sql);
         }
         $code = current(sybase_fetch_row($error));
         switch ($code) {
             case 1205:
                 // Deadlock
                 throw new \rdbms\SQLDeadlockException($message, $sql, $code);
             default:
                 // Other error
                 throw new \rdbms\SQLStatementFailedException($message, $sql, $code);
         }
     } else {
         if (true === $result) {
             return new QuerySucceeded(sybase_affected_rows($this->handle));
         } else {
             return new SybaseResultSet($result, $this->tz);
         }
     }
 }
開發者ID:xp-framework,項目名稱:rdbms,代碼行數:58,代碼來源:SybaseConnection.class.php

示例11: affectedRows

 public function affectedRows()
 {
     if (!empty($this->connect)) {
         return sybase_affected_rows($this->connect);
     } else {
         return false;
     }
 }
開發者ID:Allopa,項目名稱:ZN-Framework-Starter,代碼行數:8,代碼來源:SybaseDriver.php

示例12: _performQuery

 function _performQuery($queryMain)
 {
     $this->_lastQuery = $queryMain;
     $this->_expandPlaceholders($queryMain, false);
     // Convert query if allow on fly encodings
     if ($this->lcharset && $this->rcharset) {
         $sql_query = mb_convert_encoding($queryMain[0], $this->rcharset, $this->lcharset);
     } else {
         $sql_query = $queryMain[0];
     }
     $result = sybase_query($sql_query, $this->link);
     if ($result === false) {
         return $this->_setDbError($queryMain[0]);
     }
     if (!is_resource($result)) {
         if (preg_match('/^\\s* INSERT \\s+/six', $queryMain[0])) {
             // INSERT queries return generated ID.
             $result = sybase_fetch_assoc(sybase_query("SELECT @@identity insert_id", $this->link));
             return isset($result['insert_id']) ? $result['insert_id'] : true;
         }
         // Non-SELECT queries return number of affected rows, SELECT - resource.
         return sybase_affected_rows($this->link);
     }
     return $result;
 }
開發者ID:Ambalus,項目名稱:DbSimple,代碼行數:25,代碼來源:Sybase.php


注:本文中的sybase_affected_rows函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。