本文整理汇总了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;
}
示例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();
}
}
示例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;
}
示例4: nextRowset
/**
* Move to the next row
*/
public function nextRowset()
{
if ($this->_statement !== null) {
$this->_statement->nextRowset();
}
$this->_index++;
}
示例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());
}
}
示例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;
}
示例7: nextRowset
/**
* 在一个多行集语句句柄中推进到下一个行集
* @return bool
*/
public function nextRowset()
{
return $this->_PDOStatement->nextRowset();
}
示例8: next_result
public static function next_result(\PDOStatement $stmt)
{
return $stmt->nextRowset();
}
示例9: nextRowset
/**
* @return bool
* @throws \Compeek\PDOWrapper\NotConnectedException
*/
public function nextRowset()
{
$this->requireConnection();
return $this->pdoStatement->nextRowset();
}
示例10: nextRowset
public function nextRowset()
{
$this->_pdoStatement->nextRowset();
}
示例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;
}
示例12: nextRowset
/**
* @return void
*/
public function nextRowset()
{
$this->execute();
return parent::nextRowset();
}
示例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);
}