Add flatten() method #13

Merged
vlw merged 2 commits from refs/pull/13/head into master 2023-11-02 10:36:01 +01:00
vlw commented 2023-11-02 10:21:25 +01:00 (Migrated from codeberg.org)

This PR adds a new method MySQL->flatten() that replaces response array flattening by passing 1 to MySQL->limit().

This allows more control when array flattening should be used and less magic. There are instances where returning an array of arrays is helpful even if there is only one entry (such as listing in templating)

This PR adds a new method `MySQL->flatten()` that replaces response array flattening by passing `1` to `MySQL->limit()`. This allows more control when array flattening should be used and less magic. There are instances where returning an array of arrays is helpful even if there is only one entry (such as listing in templating)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vlw/php-mysql!13
No description provided.