-
Notifications
You must be signed in to change notification settings - Fork 824
Open
Labels
Extension: pdoAll PDO related doc issuesAll PDO related doc issuesbugDocumentation contains incorrect informationDocumentation contains incorrect informationgood first issueGood for newcomersGood for newcomers
Description
Without consulting the user comments or the PDO constants list, users don't know that FETCH_KEY_PAIR exists to read a key-value list into an associative array. The PDOStatement::fetchAll page refers to PDOStatement::fetch for a list of FETCH-Values, but FETCH_KEY_PAIR makes sense only for fetchAll. So you should add something like this
To return a key-value query as an associative array, use PDO::FETCH_KEY_PAIR as query mode. The query must retrieve exacty two columns for this to work.Metadata
Metadata
Assignees
Labels
Extension: pdoAll PDO related doc issuesAll PDO related doc issuesbugDocumentation contains incorrect informationDocumentation contains incorrect informationgood first issueGood for newcomersGood for newcomers