I have a table with some items in it. Only one of them is active. On a page I display them all and you can click to activate one, the id of that one to activates is posted.
What's the best way to activate that one and to deactivate the current active one?
Now I use three queries: look up the current active one, deactivate it, activate the new one.
I think there is a better way to do this.