0

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

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.