laziness, impatience, and hubris | |
PerlMonks |
Re: MySQL / Perlby aijin (Monk) |
on Dec 20, 2001 at 01:46 UTC ( [id://133277]=note: print w/replies, xml ) | Need Help?? |
Well, you could create a table in the DB which holds the last value for the auto-increment field.
Then, when you're adding the data, grab the value in that table and use it as your starting point for the incrementation. I'm assuming you're writing record by record here. When you're done writing your records, write the last used value back into the table so that you can use it next time. -aijin.
In Section
Seekers of Perl Wisdom
|
|