Hy!
Here is my problem: i have a profile and this profile has for example 100 images.
When someone visit this profile the first image will be the first result of my query that sorts by updated_at.
But if the user would want to put the image with the (id = 8) to be the first, then (id = 22) then (id = 88) and so on?
I need to put another field or is really necessary a new table to make a custom sort on images? and maybe someone explain this to me how to do?
thanks, i appreciate your help ;)
EDIT: (i appreciate if could be made with a really small amount of rows affected) for example if i have 100 images, and i swap the 4th with the 89th will be affected only 2 rows
if i have to delete the 1st image, 99 images should be updated? thats really a bad situation. Or the field could begin with number 2?(the first image had the order_field = 1)
EDIT2: if i have 100 images, with the order_field from 1 to 100, and then the user want to add a new image and to be first, then all them should be changed, right? this is something i dont want...