A while within a while
Posted on 2014-10-10
I've done a select statement and determined the number of rows
$count = 250,000
Now, I want to loop through that recordset and insert those rows 10,000 at a time. So, I'm thinking:
$myinsert = "insert into mytable (my values) values (my stuff)"...
but see, here's where I get "confused..."
I've got to insert 10,000 at a time and when I go back to repeat that insert statement for the next 10K, I've got to pick up where I left off.
It's a while within a while, a riddle within a riddle.
Looking for a mind greater than my own to show me how to pull this off.