MySQL Forums
Forum List  »  PHP

swap rows in database
Posted by: Arjan Demoed
Date: May 23, 2016 01:10AM

I have searched the forum but could not find the right awnser to my question...

I am building a dynamic navigation for my website where the links for the pages are coming from the database. In my user interface I have a table with all the links. In this table there is an option to move a row up or down to reorder it in the database.

How can I swap a row on the database with a row directly up or down? If it is possible in 1 query.

Thanks a lot for you reply!

Options: ReplyQuote


Subject
Written By
Posted
swap rows in database
May 23, 2016 01:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.