Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Reset ID(int) to last + 1? Re: Reset ID(int) to last + 1?

#96022
bungle
Member

You would only need to run it when deleting an image so

Put it in your php code as a query to be run after an image is deleted so somewhere in your delete_picture.php if you have one after the ‘DELETE from imgtable WHERE id = ‘ query is run.

Note that it will only work when the image deleted is the latest added image, i.e. if you have 20 images in the system and someone deletes 4 this won’t cause the auto increment to drop to 4, but if you delete 20 then it will reset to 20