当前位置: 首页>>代码示例>>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;未经允许,请勿转载。