On Thu, Mar 23, 2006 at 11:04:55AM -0500, SGreen@stripped wrote:
> saf@stripped (saf) wrote on 03/23/2006 10:50:10 AM:
> The short answer is "no". The Record #2 already existed. It's current
> status is "deleted". If you had other tables that linked their data to
> record #2 and you created a new #2 to replace the one you already deleted
> then you could possibly be making a "bad" match between the old data and
> the new data.
> For the sake of data consistency and for all of the other good reasons to
> have a relational database, once an auto_increment value has been issued
> it's considered used and no other record should ever have that number.
> Only if you completely reset your table (see the command "TRUNCATE TABLE")
> could it be possibly safe to begin re-issuing the smaller numbers. Again,
> it's only possible if all of the child records that used to point to the
> old data were also deleted.
> Do not rely on the auto_increment value for record sequencing. If you need
> your records serialized in some sequential way, you will need to code the
> support for those sequential numbers in your application.
So I must do a big SELECT and then check my self every time (for each INSERT),
which IDs are free?
Hmm if the table has more than 100 000 entries, this will slow down my system.
Specialitty because the check function would be written in PHP.
Attachment: [application/pgp-signature] Digital signature signature.asc