| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2006-07-29 18:14 UTC] stochnagara at hotmail dot com
  [2006-07-29 18:23 UTC] pajoye@php.net
  [2006-12-04 02:40 UTC] iliaa@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 13:00:02 2025 UTC | 
Description: ------------ PDO gives an inconsisten error message when I use the new PDO::ATTR_DEFAULT_FETCH_MODE in combination with PDO::FETCH_INTO. Reproduce code: --------------- <? $pdo = new PDO ('sqlite::memory:'); $pdo->exec ("create table test (id integer primary key, n text)"); $pdo->exec ("INSERT INTO test (n) VALUES ('hi')"); $pdo->setAttribute (PDO::ATTR_DEFAULT_FETCH_MODE, array (PDO::FETCH_INTO, $a)); $stmt = $pdo->prepare ("SELECT * FROM test"); $stmt->execute(); var_dump($stmt->fetchAll()); Expected result: ---------------- i don't know exactly Actual result: -------------- Warning: PDOStatement::fetchAll() [function.PDOStatement-fetchAll]: SQLSTATE[HY000]: General error: PDO::FETCH_LAZY can't be used with PDOStatement::fetchAll() in ... on line 11 bool(false)