I have this db table:
Items
-------
id // values: 1,2,3,4,5 ...
name // values: Item1,Item2,Item3,Item4,Item5 ...
order // values: 1, 5, 2, 3, 4 ...
The items are images. The image order is set in an array when dragging the images around, but in order to update the order, I use one UPDATE inside a loop. I was wondering if I could do the UPDATE without using a loop.
I was wondering if I can update the item's order at once, using only one UPDATE query.
orderto be. If they're just supposed to be the same as theidyou can doUPDATE Items SET order = idbut I doubt thats what you want. Please clarify.