PDA

View Full Version : General attachment, thread and forum numbering.


djohn
10-01-2004, 04:24 PM
I have asked this question before, but seemed to get no answer whatsoever. It can't be true that people in that community bever wondered, how come that when you delete an attachment with id 1, and that is the only attachment there is, the next attachment you upload has id 2, not 1. How come? After i delete any attachment, i want it's id to be taken next time i upload something, so that i don't get any non-existing ids. How can i achieve this?

CarCdr
10-01-2004, 06:19 PM
The unique ID comes from MySQL, not vBulletin. Without extraordinary measures, there is nothing you can do to change this.

djohn
10-01-2004, 07:18 PM
how should i alter my mysql table then?

Natch
10-02-2004, 12:54 PM
You would need to run a query recounting your Attachment id's every time you deleted an attachment, at the same time cross referencing with every other table that refer's top those attachment ID's and making the same alteration there...

nexialys
10-02-2004, 03:09 PM
the actual structure of MySQL force you to use auto-increment tables when adding numbered elements... you can't put back the auto-incremented number as you require, when deleting the last element of a table... or you have to delete the table and insert the content back. i don't think it worth the job...