• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP sybase_affected_rows函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP sybase_close函数代码示例发布时间:2022-05-23
下一篇:
PHP swritefile函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap