You are here:  » auto increment


auto increment

Submitted by arthuc01 on Fri, 2006-02-10 16:19 in

Hi guys

For some reaosn auto-increment of product id has gopt out of whack and there is a big gap in the number sequence is there a way to fix this?

Chris

Submitted by support on Fri, 2006-02-10 16:22

Hi Chris,

A PHP script can't have any control over the auto-increment value within a MySQL database table. It will always increment for as long as there are records in the table; even if a large block is deleted those numbers will never be "resused".

Submitted by searley on Fri, 2006-02-10 16:23

this is normal, and will happen as records get deleted and imported, with unique-id's a number does not normally get reused

Submitted by IG on Fri, 2006-02-10 16:50

Will this slow down the database over time?

Submitted by support on Fri, 2006-02-10 16:51

No; it's not a problem at all. This is normal practice for almost all database applications.

Submitted by searley on Fri, 2006-02-10 17:25

it is purly a way to ensure that every record get a unique id, as some application use the uniquie ID to tie things together

the only way to ensure it remains unique is not to allow numbers to be reused