當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。