On Friday 04 April 2003 00:53, Charles Kline wrote:

> I have a table that contains the 'Sort Order' of some stories which are
> kept in another table. I want to be able to 're-order' these items but
> I am not sure how to go about this (technique wise).
> For example: I have a form with a series of select menus. Each menu
> represents the position of the story on the page where they are
> displayed. Each menu has the same list of titles, and I want to use
> these menus to re-order the display order. So the menus display the
> titles in the current order, and changing one of the menus - reorders
> the position in the sort order table.
> Anyone have any thoughts?

First you going to need some extra fields in your table to hold the sort 

There are at least two ways to go about this:

- Have one extra field which holds the absolute position of the record
- Have two extra fields to create a linked list. The fields will hold the 
previous and next records in the list

I'll leave you to work out the implementation details.

Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
Search the list archives before you post
The "cutting edge" is getting rather dull.
                -- Andy Purshottam

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to