Hi,
I would like to set the fetch mode for all the pdoStatements how can i do that.
For the moment i have only found a method that will set the fetch mode for the pdoStatement instance the method is applied to.
ex:
this works fine for that instance of pdoStatement. but i would like it to be permanent.
so is there any static pdoStatement::s etFetchMode(); kind of method
or PDO instance method : $pdo->setFetchMode() ;
thanks
I would like to set the fetch mode for all the pdoStatements how can i do that.
For the moment i have only found a method that will set the fetch mode for the pdoStatement instance the method is applied to.
ex:
Code:
$connection = new PDO(...); $sql = "SELECT * FROM table"; $statement = $connection->prepare($sql); $statement->setFetchMode(PDO::FETCH_ASSOC); $statement->execute(); $rows = $statement->fetchAll();
so is there any static pdoStatement::s etFetchMode(); kind of method
or PDO instance method : $pdo->setFetchMode() ;
thanks
Comment