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


PHP mysqli_result::close方法代碼示例

本文整理匯總了PHP中mysqli_result::close方法的典型用法代碼示例。如果您正苦於以下問題:PHP mysqli_result::close方法的具體用法?PHP mysqli_result::close怎麽用?PHP mysqli_result::close使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mysqli_result的用法示例。


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

示例1: Close

 /**
  * (non-PHPdoc)
  * @see Phine/Framework/Database/Interfaces/IDatabaseReader#Close()
  */
 function Close()
 {
     if (!$this->IsClosed()) {
         $this->result->close();
         $this->closed = true;
     }
 }
開發者ID:agentmedia,項目名稱:phine-framework,代碼行數:11,代碼來源:Reader.php

示例2: loadDataFromMysqliStatement

 /**
  * Mysqli's binding and returning of statement values
  * Mysqli requires you to bind variables to the extension in order to
  * get data out.  These values have to be references:
  *
  * @see http://php.net/manual/en/mysqli-stmt.bind-result.php
  * @throws Exception\RuntimeException
  * @return bool
  */
 protected function loadDataFromMysqliStatement()
 {
     $data = null;
     // build the default reference based bind structure, if it does not already exist
     if ($this->statementBindValues['keys'] === null) {
         $this->statementBindValues['keys'] = array();
         /* @var $resultResource \mysqli_result */
         $resultResource = $this->resource->result_metadata();
         foreach ($resultResource->fetch_fields() as $col) {
             $this->statementBindValues['keys'][] = $col->name;
         }
         $this->statementBindValues['values'] = array_fill(0, count($this->statementBindValues['keys']), null);
         $refs = array();
         foreach ($this->statementBindValues['values'] as $i => &$f) {
             $refs[$i] =& $f;
         }
         call_user_func_array(array($this->resource, 'bind_result'), $this->statementBindValues['values']);
     }
     if (($r = $this->resource->fetch()) === null) {
         if (!$this->isBuffered) {
             $this->resource->close();
         }
         return false;
     } elseif ($r === false) {
         throw new Exception\RuntimeException($this->resource->error);
     }
     // dereference
     for ($i = 0, $count = count($this->statementBindValues['keys']); $i < $count; $i++) {
         $this->currentData[$this->statementBindValues['keys'][$i]] = $this->statementBindValues['values'][$i];
     }
     $this->currentComplete = true;
     $this->nextComplete = true;
     $this->position++;
     return true;
 }
開發者ID:musicsnap,項目名稱:Yaf.Global.Library,代碼行數:44,代碼來源:Result.php

示例3:

<?php

require_once "connect.inc";
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->real_query("SELECT 'foo' FROM test_062_table_1");
$myresult = new mysqli_result($mysql);
$row = $myresult->fetch_row();
$myresult->close();
$mysql->close();
var_dump($row);
print "done!";
開發者ID:alphaxxl,項目名稱:hhvm,代碼行數:11,代碼來源:062.php

示例4: clear

 public function clear()
 {
     $this->_results->close();
     $this->_results = null;
     $this->_num_rows = null;
 }
開發者ID:gaiius,項目名稱:tokonlen,代碼行數:6,代碼來源:Db.php


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