vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   General attachment, thread and forum numbering. (https://vborg.vbsupport.ru/showthread.php?t=70072)

djohn 10-01-2004 03:24 PM

General attachment, thread and forum numbering.
 
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 05: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 06:18 PM

how should i alter my mysql table then?

Natch 10-02-2004 11:54 AM

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 02: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...


All times are GMT. The time now is 01:24 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03750 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete