• Hi,
    i recently uploaded a number of test galleries and then deleted them. Now when i upload a completely new gallery, its gallery id ($gid) has automatically resolved at 12.
    This is obviously because i had 11 galleries before. HOwever i deleted them from the nggallery interface as well as the database.
    Can anyone help. I need to reset the gallery id number so that when i restart uploading galleries it starts at “1” again.

    I really need the gallery ids to increment one after the other so if the last gallery had an id of 1 i need the next one to have an id of 2;… any suggestions?

    Thanks a lot

    Simon

Viewing 4 replies - 1 through 4 (of 4 total)
  • Lookin’ for the same thing :/

    This is likely due to the database’s auto increment column type. Even though you might delete everything in the column, it’s going to continue with the next value after that. In effect, it keeps state regardless of what you delete.

    If you identify the table in question that stores this data (I don’t have time to go digging right now), you can reset the auto increment value to be 1 plus the largest value in the table:

    ALTER TABLE tablename AUTO_INCREMENT = 1

    Beyond that, if it works the way I’m assuming, you’re SOL.

    Has anyone found a solution for this? The OCD in me wont let me rest. Its extremely annoying to delete a gallery or image and not be able to resume at the # of the gallery or image that was deleted. Causes alot of stress & extra work on my end. What needs to be edited in the database or plugin so that when we delete a gallery the number for it doesnt exist anymore? Can anyone please help!

    Probably edit the table so the field is not auto increment and add logic to the plugin to get max(gid)+1 when adding a new gallery.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: NextGEN Gallery] Gallery ID incrementation a bit wack – HELP!’ is closed to new replies.