$stmt = $dbh->query("select * from (select * from some_table) where ROWNUM <= 5");
$results = $stmt->fetchAll();
It would return an array indexed by column number only and not both. The default fetch method, however if PDO::FETCH_BOTH and should therefore return an array that is both indexed by number and by column name.
The results would return
When running the following:
It would return an array indexed by column number only and not both. The default fetch method, however if PDO::FETCH_BOTH and should therefore return an array that is both indexed by number and by column name. The results would return