PDA

View Full Version : Image id numbers


yungyaw
02-21-2005, 03:49 PM
I noticed that the image id for the permalink is runing on sequential numbers.

I've once had an error and I have skip a number in the sequence. I would like to reset the image id back so that it follows the sequential number.

I tried to edit the image id manually in the MySQL database. I managed to change the image id for that particular picture, but when I add a new image, the image id will continue from where it left off and not from the number I've changed.

Example:
Entry #1, image id = 36
Entry #2, image id = 38

I changed image id for Entry #2 back to 37, but when I add new image again (Entry #3), the image id will be 39 instead of 38.

Does anyone know how pixelpost keep track of the image id number. Is the any way to reset the image id?

Thanks!

raminia
02-21-2005, 07:25 PM
nope!
not a rational way!
Why you do want such a thing?! this id is a 'key' in the table and increments automatically.

blinking8s
02-22-2005, 03:26 AM
nope!
not a rational way!
Why you do want such a thing?! this id is a 'key' in the table and increments automatically.

haha...he is too picky and wants his ID's in sequence...

lol...dont mess up when you post :) or you'll spend some time in MySQL to fix it...when you cahnge the ID you have to alter the comments and such too.

Its seriously no big deal...just, becareful when you post..and try not to delete stuff. its the way this stuff works.

raminia
02-22-2005, 10:51 AM
what good image id could do for you anyway?

yungyaw
02-22-2005, 12:30 PM
Sequential id number can represent how many photos I've posted and easier to keep track.

Yeah. I should just stick with whatever id the script assigned for me. I should concentrate on my photos instead of the id. :wink:

Maybe I'm just curious to know where pixelpost keep the running number?

raminia
02-22-2005, 12:54 PM
<SITE_PHOTONUMBER> tag gives you the number of photos you have posted.

blinking8s
02-23-2005, 11:37 AM
the id number isnt the number of the photo, its a reference for the database and php to pull up the image, a tag, or bookmark if you will

raminia is right, that tag inserted into the sites template will display how many total photos have been posted.

Connie
02-23-2005, 11:55 AM
I remember for more than 15 years in my job now that people want to "re-order" the ids because they have some "missing numbers" in there...

that's a very common misunderstanding of database-needs, I remember how often I tried to teach:

[b]don't mind the id, the id is for identification but not for counting!!!!
there are other means to get the number of the items in the table... [/]

let's add this point to our "virtual faq", I am sure we will get this question more often :)