Reputation: 1649
I have a listview that can contain up to roughly 2,000 listview items I need to loop through the listview and insert each item into a mysql database
is there a better, bulk way, to insert the data instead of doing an insert for each item like follows:
for each itm ...
insert into whatever ( id ) values ( itm.text ) ...
next
Thanks
Upvotes: 0
Views: 1673
Reputation: 24236
You could build up a file containing the changes and then use the 'LOAD DATA INFILE
' functionality -
http://dev.mysql.com/doc/refman/5.0/en/load-data.html
Upvotes: 1