Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I do a multiple row insert? #155

Open
tvirelli opened this issue Sep 7, 2023 · 2 comments
Open

How can I do a multiple row insert? #155

tvirelli opened this issue Sep 7, 2023 · 2 comments

Comments

@tvirelli
Copy link

tvirelli commented Sep 7, 2023

In SQL I can do an insert with multiple rows using something like
INSERT INTO table (id,name) VALUES (1,'None'), (2,'Single'), (3,'Double'), (4,'Triple')

How can I do this with easydb? Can I create a multidimensional array and pass it to the insert() function or do I need to write my own loop for the array?

@paragonie-security
Copy link
Contributor

@tvirelli
Copy link
Author

Awesome, thank you for that. Not sure if it's possible, but adding the ability to add an "ignore" flag to all the types of "inserts" functions would be great. So I could do an insertMultiple("table",$arrayMap,$ignore=true); or something along those lines. I might be the only person needing this so I fully understand if that doesn't make it as an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants