> 
> I am using MySQL ver. 3.22.32
> 
> When a table has an auto-incrementing ID field and the last inserted
> record had an ID of, say, 100, then I delete that record, the database
> engine will re-use the 100 value. How can I get the engine to never
> repeat an ID value to avoid corrupted data correlations?

I get round a very similar problem by having a validity marker in each
record :

        valid   tinyint default 1,

Instead of deleting records, set the marker to zero and once a day (more
often if you get heavy traffic in the table) tidy the table by deleting
all invalid records except for the one with the highest auto_increment
field.  A bit messy, but it does work.


The Hooker
--
"I've had a perfectly wonderful evening, but this wasn't it"

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to