Closed Strosch closed 9 years ago
That is not a bug. http://php.net/manual/en/pdostatement.fetchall.php
You have to write PDO::FETCH_ASSOC like a parameter inside fetchAll() function ;)
$database->query("SELECT * FROM EMPLE")->fetchAll(PDO::FETCH_ASSOC);
use PDO::ATTR_DEFAULT_FETCH_MODE on connection.
new Medoo([
'database_type' => 'mysql',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_general_ci',
'option' => [PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC]
]);
Hi guys!
First off: Awesome lil framework you've got there! :-)
Unfortunately I don't know if this bug was already reported so here it is: Running a complicated SELECT query via $database->query() and then doing fetchAll() returns all rows twice.
Something like that:
would give the following array:
Any ideas on this?
cheers, P