Insert multiple values with MySQL->insert() by passing multiple arrays #44
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
vlw/php-mysql#44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In order to insert multiple rows at once into a table, right now, you have to loop over each row can call
MySQL->insert()on each.Example:
When I think it would be nice to accept both an assoc array as a single row (current behavior), or multiple arrays as n arguments to insert each.
The simplest way to achieve this I guess would be to loop through this block for each row
codeberg.org/vlw/php-mysql@c64eb96049/src/MySQL.php (L254-L264)