I was doing some things today that involved me pulling data from a csv file and tossing it into mysql. It got me thinking as I am new to php.
Would I not want to somehow get this in one query statement instead of executing a whole bunch of seperate inserts by looping through the array that I made from the csv file.
I know MySQL can do;
INSERT INTO table (bla, bla) VALUES
('a','b'),
('c','d');
Instead of just sql standard;
INSERT INTO table (bla, bla) VALUES ('a','b');
INSERT INTO table (bla, bla) VALUES ('c','d');
So my question is..... Is there a better way to do this other than what I have already said? Also, is there a good way to execute a script of commands?