ID: 38103 User updated by: jeffmlevy+phpbugs at gmail dot com Reported By: jeffmlevy+phpbugs at gmail dot com Status: Bogus Bug Type: PDO related Operating System: Debian GNU Linux PHP Version: 5.1.4 Assigned To: wez New Comment:
I wholeheartedly apologize. I meant "fetch()", not fetchAll(). This issue applies to $stmt->fetch(PDO::FETCH_INTO, $this) Thank you. Previous Comments: ------------------------------------------------------------------------ [2006-07-14 12:01:08] [EMAIL PROTECTED] RTM. At no point does it tell you that you can use FETCH_INFO with fetchAll(). Think about what that means. ------------------------------------------------------------------------ [2006-07-14 10:12:39] jeffmlevy+phpbugs at gmail dot com Description: ------------ Note: Mysql PDO. PDO fails with error when calling fetchAll() w/PDO::FETCH_INTO. Implicit call to setFetchMode(PDO::FETCH_INTO, $oObject) passes the test, however. Reproduce code: --------------- $stmt = $dbh->prepare("call data_loader()"); $stmt->setFetchMode(PDO::FETCH_INTO, $this); $stmt->fetchAll(); results in proper assignment of return vars to object props. BUT: $stmt = $dbh->prepare("call data_loader()"); $stmt->fetchAll(PDO::FETCH_INTO, $this); calling with $this results in: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: Extraneous additional parameters calling without $this results in PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: No fetch-into object specified. Expected result: ---------------- Expect class properties to be properly populated. Actual result: -------------- Error thrown. Could be lack of documenatation?? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38103&edit=1