I am populating a table with an array of dates for an event.
I was trying to create a query that would insert all the rows at once like:
INSERT INTO tEventDates SET EventID='1', Date='2000-01-24', Time='2:00 p.m.', INSERT INTO tEventDates SET EventID='1', Date='2000-01-25', Time='2:00 p.m.', INSERT INTO tEventDates SET EventID='1', Date='2000-01-26', Time='2:00 p.m.', INSERT INTO tEventDates SET EventID='1', Date='2000-01-27', Time='2:00 p.m.', INSERT INTO tEventDates SET EventID='1', Date='2000-01-28', Time='2:00 p.m.', INSERT INTO tEventDates SET EventID='1', Date='2000-01-29', Time='2:00 p.m.',
I tried separating each INSERT with a ; at first only to learn PHP didn't allow that. I have tried leaving a blank space between them and a ,.
I assume this just isn't possible in PHP?
Am I wrong? if so how do I do this.
I know I can loop through my query array and do each one individually. I just thought it might be a faster operation to pass them as one biq query.
Any ideas?
Thanks.