Reputation: 32673
I have 20 items. Is it possible to insert 20 items only with one query (without loops)?
Upvotes: 0
Views: 162
Reputation: 10485
INSERT into `table` (`1`,`2`,`3`....`20`) VALUES (`value1`,`value2`,`value3`,...`value20`)
Upvotes: 0
Reputation: 36512
Look into syntax like this:
INSERT INTO table (column) VALUES (item1), (item2), (item3), ...
Upvotes: 7