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


PHP PDOStatement::nextRowset方法代碼示例

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


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

示例1: nextRowset

 /**
  * @return $this
  */
 public function nextRowset()
 {
     if (!parent::nextRowset()) {
         throw new Exception\RuntimeException('Rowset is not available.');
     }
     return $this;
 }
開發者ID:gajus,項目名稱:doll,代碼行數:10,代碼來源:PDOStatement.php

示例2: _query

 /**
  * 
  * @throws PDOException
  */
 public function _query()
 {
     if ($this->_rowset === false) {
         if (self::$_stmt) {
             while (self::$_stmt->nextRowset()) {
                 //如果已經在結果緩存中,則搜尋結果集
                 $query = array_shift(self::$_fetchingQueue);
                 $query->_rowset = $query->_fetchAll();
                 if ($query === $this) {
                     return;
                 }
             }
             self::$_stmt = null;
         }
         //將當前的語句插到第一個,然後把所有語句一口氣打包發送給mysql
         $keys = array_keys(self::$_waitingQueue, $this);
         if (count($keys)) {
             unset(self::$_waitingQueue[$keys[0]]);
         }
         $sql = $this->_select->assemble();
         if (count(self::$_waitingQueue)) {
             $sql .= ";\n" . implode(";\n", self::$_waitingQueue);
         }
         implode(";\n", self::$_waitingQueue);
         self::$_stmt = $this->_select->getAdapter()->query($sql);
         $this->_rowset = $this->_fetchAll();
         self::$_fetchingQueue = self::$_waitingQueue;
         self::$_waitingQueue = array();
     }
 }
開發者ID:shen2,項目名稱:mypdo,代碼行數:34,代碼來源:Statement.php

示例3: nextRowset

 /**
  * Advances the reader to the next rowset
  * Not supported by mssql
  *
  * @return boolean
  */
 public function nextRowset()
 {
     if (false !== ($result = $this->_statement->nextRowset())) {
         $this->_index = null;
     }
     return $result;
 }
開發者ID:kisma,項目名稱:kisma,代碼行數:13,代碼來源:DataReader.php

示例4: nextRowset

	/**
	 * Move to the next row
	 */
	public function nextRowset()
	{
		if ($this->_statement !== null) {
			$this->_statement->nextRowset();
		}
		$this->_index++;
	}
開發者ID:neronen,項目名稱:tsoha-k11p4-atomik,代碼行數:10,代碼來源:Result.php

示例5: nextRowset

 /**
  * Retrieves the next rowset (result set) for a SQL statement that has
  * multiple result sets.  An example is a stored procedure that returns
  * the results of multiple queries.
  *
  * @return bool
  * @throws Zend_Db_Statement_Exception
  */
 public function nextRowset()
 {
     try {
         return $this->_stmt->nextRowset();
     } catch (PDOException $e) {
         require_once 'Zend/Db/Statement/Exception.php';
         throw new Zend_Db_Statement_Exception($e->getMessage());
     }
 }
開發者ID:jorgenils,項目名稱:zend-framework,代碼行數:17,代碼來源:Pdo.php

示例6: getMoreResults

 public function getMoreResults()
 {
     $this->checkClosed();
     $this->stmt->nextRowset();
     $this->resultSet = null;
     $this->updateCount = -1;
     if ($this->stmt->columnCount() == 0) {
         $this->updateCount = $this->stmt->rowCount();
         return false;
     }
     return true;
 }
開發者ID:robo47,項目名稱:BlazeFramework,代碼行數:12,代碼來源:AbstractStatement.php

示例7: nextRowset

 /**
  * 在一個多行集語句句柄中推進到下一個行集
  * @return bool
  */
 public function nextRowset()
 {
     return $this->_PDOStatement->nextRowset();
 }
開發者ID:im286er,項目名稱:madphp,代碼行數:8,代碼來源:Connection.php

示例8: next_result

 public static function next_result(\PDOStatement $stmt)
 {
     return $stmt->nextRowset();
 }
開發者ID:radsectors,項目名稱:sqlshim,代碼行數:4,代碼來源:sqlshim.php

示例9: nextRowset

 /**
  * @return bool
  * @throws \Compeek\PDOWrapper\NotConnectedException
  */
 public function nextRowset()
 {
     $this->requireConnection();
     return $this->pdoStatement->nextRowset();
 }
開發者ID:compeek,項目名稱:pdo-wrapper,代碼行數:9,代碼來源:PDOStatement.php

示例10: nextRowset

 public function nextRowset()
 {
     $this->_pdoStatement->nextRowset();
 }
開發者ID:cargomedia,項目名稱:cm,代碼行數:4,代碼來源:Result.php

示例11: ManageExecutionResult

 private function ManageExecutionResult(\PDOStatement $dbStatement)
 {
     $result = array();
     $isValid = true;
     foreach ($this->dbConfigList() as $dbConfig) {
         if (!$isValid) {
             break;
         } elseif ($this->CheckType($dbConfig->type(), DbExecutionType::SELECT)) {
             $dbStatement->setFetchMode(\PDO::FETCH_CLASS | \PDO::FETCH_PROPS_LATE, $dbConfig->daoClassName());
             $list = $dbStatement->fetchAll();
             $result = count($list) > 0 ? $list : array();
         } elseif ($this->CheckType($dbConfig->type(), DbExecutionType::UPDATE)) {
             $result = true;
         } elseif ($this->CheckType($dbConfig->type(), DbExecutionType::INSERT)) {
             $result = $this->dao->lastInsertId();
         } elseif ($this->CheckType($dbConfig->type(), DbExecutionType::SHOWTABLES)) {
             $result = $dbStatement->fetchAll(\PDO::FETCH_NUM);
         } elseif ($this->CheckType($dbConfig->type(), DbExecutionType::COLUMNNAMES)) {
             $result = $dbStatement->fetchAll(\PDO::FETCH_COLUMN);
         } elseif ($this->CheckType($dbConfig->type(), DbExecutionType::COLUMNMETAS)) {
             $result = $dbStatement->fetch(\PDO::FETCH_ASSOC);
         } elseif ($this->CheckType($dbConfig->type(), DbExecutionType::MULTIROWSET)) {
             //TODO: to implement.
             $isValid = $dbStatement->nextRowset();
         }
     }
     $dbStatement->closeCursor();
     return $result;
 }
開發者ID:Puzzlout,項目名稱:FrameworkMvcLegacy,代碼行數:29,代碼來源:BaseManager.php

示例12: nextRowset

 /**
  * @return void 
  */
 public function nextRowset()
 {
     $this->execute();
     return parent::nextRowset();
 }
開發者ID:mirkoargentino,項目名稱:bbn,代碼行數:8,代碼來源:query.php

示例13: nextRowset

 /**
  * @return bool
  */
 public function nextRowset()
 {
     $archLog = array('method' => 'PDOStatement::nextRowset', 'input' => array(), 'output' => $this->PDOStatement->nextRowset(), 'pointer' => $this->assignPointerString());
     return self::setLogReturnOutput($archLog);
 }
開發者ID:AdrianTrainorPHP,項目名稱:QueryScanner,代碼行數:8,代碼來源:ArchPDOStatement.php


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