Skip to content

Double entries when using ->query()->fetchAll() #1093

Closed Answered by catfan
AndiLeni asked this question in Q&A
Discussion options

You must be logged in to vote

The query() returns PDOStatement object, and you are calling its fetchAll().

The result is correct with both index and key by default.

To get a different type of result, check out the parameters from the documentation.
https://www.php.net/manual/en/pdostatement.fetchall.php

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AndiLeni
Comment options

Answer selected by AndiLeni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants