Hi all,
Ok, I am wanting to insert into a table multiple rows automatically. I relaise that you can use "VALUES ("string1", "string2"), ("string3", "string4")" to insert multiple rows, but I cannot specify the values I want to insert, and similarly the number of records to insert.
I am getting the records from a text file which I have uploaded to the server. Where each value is seperated by a ",". This is a small selection of the data stored in the text file uploaded:
"000000000000952019","000000952019","DESC",1.00,1,0
"000000000001542141","000001542141","DESC2",1.00,1,0
As you can see there are 2 records shown here. So I need a way of inserting these records into the table, along with a possible 20,000 other records. (serious!) - (i.e. I maybe a loop of some sort?)
If I need a loop, a foreach sounds good but I am unaware as to how to use it here and create appropriate arrays using the data.
Any help would be appreciated.
Cheers guys.