yajra / pdo-via-oci8

PHP PDO_OCI functions via OCI8 extension
Other
88 stars 61 forks source link

Fix default Statement fetch method's return variable #3

Closed ghost closed 10 years ago

ghost commented 10 years ago

When running the following:

$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