I am fetching my page's menu from a MySQL table as an unordered list <ul></ul>
ORDERERED BY their position, Here is my MySQL table's screenshot
I want my query to work in a way like when I fetch record of page_id_pk=3, it SET its page_position from 3 to 2 and updates it so now it holds page_position 2. The rest of the pages (rows) move down by an increment of one. I don't want to just swap two rows but to change their position i.e their page_id_pk sequence will remain same just their position gets changed.