note 108977 rejected from pdostatement.nextrowset by danbrown
| From: | danbrown@php.net | Date: | Wed, 13 Jun 2012 15:32:42 +0000 |
| Subject: | note 108977 rejected from pdostatement.nextrowset by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-188587@lists.php.net to get a copy of this message | ||
Note Submitter: edward dot peng at itsail dot com
----
It's wired below script will give me an exception 'PDOException' with message
'SQLSTATE[HY000]: General error'.
It shouldn't!!! Who knows the reason???
<?php
try {
$sql = 'CALL multiple_rowsets()';
$stmt = $conn->query($sql);
do {
print_r($stmt->fetchAll(PDO::FETCH_NUM));
} while ($stmt->nextRowset());
} catch (PDOException $e) {
echo $e->getMessage();
}
?>