Hello,
my problem is related to uploading images (i keep info data in database and images in filesystem).
I plan to generate image path from image ID, that's why i need to get the ID of the last inserted image.
For example: image with ID 123456789 has this path /images/123/456/789
To determine the image path for the new image i want to upload, i need to get the ID of the last uploaded image.
For example, the last uploaded image has the ID: 234565445678.
My question is, how to effectivelly get the last ID from "image" table, without counting all the image records every time a user wants to upload an image.
Is there a good way to get the last ID, maybe to store that ID info in some additional table or something like that.