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


PHP resource::closeCursor方法代码示例

本文整理汇总了PHP中resource::closeCursor方法的典型用法代码示例。如果您正苦于以下问题:PHP resource::closeCursor方法的具体用法?PHP resource::closeCursor怎么用?PHP resource::closeCursor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在resource的用法示例。


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

示例1: close

 /**
  * Closes the resource.
  */
 public function close()
 {
     if ($this->_resource) {
         $this->_resource->closeCursor();
     }
     unset($this->_resource);
     $this->_resource = null;
     $this->_data = [];
 }
开发者ID:crysalead,项目名称:chaos-database,代码行数:12,代码来源:Cursor.php

示例2: freeResult

 /**
  * Method to free up the memory used for the result set.
  *
  * @param   mixed  $cursor  The optional result set cursor from which to fetch the row.
  *
  * @return  void
  *
  * @since   1.0
  */
 protected function freeResult($cursor = null)
 {
     $this->executed = false;
     if ($cursor instanceof \PDOStatement) {
         $cursor->closeCursor();
         $cursor = null;
     }
     if ($this->prepared instanceof \PDOStatement) {
         $this->prepared->closeCursor();
         $this->prepared = null;
     }
 }
开发者ID:akeeba,项目名称:angie,代码行数:21,代码来源:pdo.php

示例3: __destruct

 /**
  * Frees up the result object
  * 
  * @internal
  * 
  * @return void
  */
 public function __destruct()
 {
     if (!is_resource($this->result) && !is_object($this->result)) {
         return;
     }
     // stdClass results are holders for prepared statements, so we don't
     // want to free them since it would break fStatement
     if ($this->result instanceof stdClass) {
         if ($this->database->getExtension() == 'msyqli') {
             $this->result->statement->free_result();
         }
         unset($this->result);
         return;
     }
     switch ($this->database->getExtension()) {
         case 'ibm_db2':
             db2_free_result($this->result);
             break;
         case 'mssql':
             mssql_free_result($this->result);
             break;
         case 'mysql':
             mysql_free_result($this->result);
             break;
         case 'mysqli':
             mysqli_free_result($this->result);
             break;
         case 'oci8':
             oci_free_statement($this->result);
             break;
         case 'odbc':
             odbc_free_result($this->result);
             break;
         case 'pgsql':
             pg_free_result($this->result);
             break;
         case 'sqlite':
             unset($this->result);
             break;
         case 'sqlsrv':
             sqlsrv_free_stmt($this->result);
             break;
         case 'pdo':
             $this->result->closeCursor();
             break;
     }
     $this->result = NULL;
 }
开发者ID:philip,项目名称:flourish,代码行数:55,代码来源:fUnbufferedResult.php

示例4: __destruct

 /**
  * Frees up the result object
  * 
  * @internal
  * 
  * @return void
  */
 public function __destruct()
 {
     if (!is_resource($this->result) && !is_object($this->result)) {
         return;
     }
     switch ($this->database->getExtension()) {
         case 'mssql':
             mssql_free_result($this->result);
             break;
         case 'mysql':
             mysql_free_result($this->result);
             break;
         case 'mysqli':
             mysqli_free_result($this->result);
             break;
         case 'oci8':
             oci_free_statement($this->result);
             break;
         case 'odbc':
             odbc_free_result($this->result);
             break;
         case 'pgsql':
             pg_free_result($this->result);
             break;
         case 'sqlite':
             unset($this->result);
             break;
         case 'sqlsrv':
             sqlsrv_free_stmt($this->result);
             break;
         case 'pdo':
             $this->result->closeCursor();
             break;
     }
     $this->result = NULL;
 }
开发者ID:jsuarez,项目名称:MyDesign,代码行数:43,代码来源:fUnbufferedResult.php

示例5: freeRecordSet

 /**
  * will free all memory associated with the result identifier result.
  *
  * @param resource $result query result
  *
  * @return bool TRUE on success or FALSE on failure.
  * @deprecated since version 2.6.0 - alpha 3. Switch to doctrine connector.
  */
 public function freeRecordSet($result)
 {
     $this->deprecated();
     return $result->closeCursor();
 }
开发者ID:redmexico,项目名称:XoopsCore,代码行数:13,代码来源:mysqldatabase.php

示例6: freeResult

	/**
	 * Free database result
	 *
	 * @access public
	 * @param resource $resource
	 * @return boolean
	 */
	function freeResult($resource) {
		return $resource->closeCursor();
	} // freeResult
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:10,代码来源:PdoMysqlDBAdapter.class.php


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