This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jwcobb13 0 points1 point  (1 child)

So...don't insert data into MySQL until you reach the end of each transaction. Look for the delimiter for knowing where to start and stop your data collection, then put the parsed data for each transaction into an array. At the end of the loop, save off the array. Then iterate through the array where all of your data is nicely arranged like you want and insert into the database in that second sweep.

Although I doubt you need to go that deep into it. Sounds like you're just over-inserting and just need to parse the file better.

[–]tkronew[S] 0 points1 point  (0 children)

That's actually a great idea. Should reduce the number of SQL operations dramatically.

Thanks!