Closed clickbid closed 4 years ago
You can see the implementation of medoo::query() at here
An instance of PDOStatement would be returned.
According to the manual, you can just pass PDO::FETCH_ASSOC to the fetchAll function so you get the associated array. Or you can pass PDO::FETCH_NUM to the fetchAll function to get the indexed array.
In case you would like to use objects, here is the solution i use : $this->pdo->query($query, PDO::FETCH_CLASS, 'stdClass');
But, since Syu point compatibility problems, i'm not sure that it's the right way.
@clickbid I had the same issue and I did what @SyuTingSong said above and it worked for me.
$data = $db->query($query)->fetchAll(PDO::FETCH_ASSOC);
Thanks @SyuTingSong
I have a standard query that has a NOT IN (select) but when I print_r($dataAry) it gives me duplicate info (see below). Any ideas?
My Results print_r($dataAry):