mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
ext/pdo: Add FETCH_INTO setting via setAttribute "hack"
This commit is contained in:
@@ -28,6 +28,11 @@ $stmt = $pdo->prepare ("SELECT * FROM test38253");
|
||||
$stmt->execute();
|
||||
var_dump($stmt->fetchAll());
|
||||
|
||||
$pdo->setAttribute (PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_INTO);
|
||||
$stmt = $pdo->prepare ("SELECT * FROM test38253");
|
||||
$stmt->execute();
|
||||
var_dump($stmt->fetchAll());
|
||||
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@@ -47,3 +52,9 @@ Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: No fetch func
|
||||
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error%s on line %d
|
||||
array(0) {
|
||||
}
|
||||
|
||||
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: No fetch-into object specified. in %s on line %d
|
||||
|
||||
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error%s on line %d
|
||||
array(0) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user