PDA

View Full Version : Adjusting Items order (not using columns)


Badger
09-01-2010, 01:04 AM
What is the best way to change the order of a list not using an existing column. I understand the ORDER ASC/DESC sql but have seen other websites that allow a user to use up and down buttons to change a list order. Some WA user interfaces have the same function.

My current method is an order field in a table and to manually change the numbers to achieve the preferred order. Hardly dynamic. What would the sql/php look like to allow up and down buttons to move a row?

I'm thinking the up button subtracts the current order field by 1 and the order value of the field with the previous value adds 1. But don't know how to do this.

Also need some scripting as well

Note: The WA tutorial on order by different columns is not thje solution I'm looking for.

Any pointers?

Jason Byrnes
09-01-2010, 06:40 AM
have you seen this tutorial that Sojo Web created?
http://www.webassist.com/forums/showthread.php?t=9353

Badger
09-05-2010, 12:24 PM
That's it. Thanks Jason, I'll give this a try

http://www.blazingimages.com/sortable-rows-with-data-assist

Jason Byrnes
09-07-2010, 11:27 AM
you're welcome.