MySQL Forums
Forum List  »  PHP

Moving a MySQL row up through the stack...
Posted by: Eric Sepich
Date: June 26, 2013 10:24PM

I have a table like this:
title,iconpath,bannerurl,summary,headerstitle,headers,backurl,forwardurl,torder,thisurl,slidescol
Education,images/iconeducation.png,images/slideeducationbanner.png,placesummaryhere,theaders,one;two;three,,slides.fastcash.php,1,slides.education.php,1
"Fast Cash",images/slides.fastcash.png,images/banner.fastcash.png,placesummaryhere,theaders,one;two;three,slides.education.php,slides.creditcards.php,2,slides.fashcash.php,2
"Credit Cards",images/slides.creditcards.png,images/banner.creditcards.png,placesummaryhere,theaders,one;two;three,slides.creditcards.php,slides.creditcards.php,3,slides.creditcards.php,3
"Government Aid",images/slides.governmentaid.png,images/banner.governmentaid.png,placesummaryhere,theaders,one;two;three,slides.governmentaid.php,slides.bankrupcy.php,4,slides.bankrupcy.php,4



I am looking for a way either by way of a MySQL query or through PHP to move an item up through the stack. For instance I may want torder 3 to become 2 and then renumber all the other torders to correspond to three moving to torder 2. The array I am ordering by torder so that my data grid view populates in the right ascending torder.

Options: ReplyQuote


Subject
Written By
Posted
Moving a MySQL row up through the stack...
June 26, 2013 10:24PM


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.