mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
ext/pdo: Add FETCH_INTO setting via setAttribute "hack"
This commit is contained in:
parent
dfcac15739
commit
abfa377fae
1 changed files with 11 additions and 0 deletions
|
@ -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) {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue