ID:               38103
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jeffmlevy+phpbugs at gmail dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: Debian GNU Linux
 PHP Version:      5.1.4
-Assigned To:      
+Assigned To:      wez


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to