Re: php class that allow quick row ordering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, April 26, 2005 7:05 pm, Graham Anderson said:
> lately, I'm finding myself reordering large amounts of rows populated
> from a database query ...with an order_id field
> this is a bit tedious re-entering every order_id  for a found set :(

Do different users get to order differently, or is there some "master"
order that all shall use?

If it's a "master" order, just put a "rank" field on the records, and then
make sure it's always 1 to N for the order you want.

You can create "up" and "down" buttons to alter the order fairly easily.

If each user gets to have their own order, then you're looking at a
playlist for each user, so I'd have a different table with just "ID" and
"rank" (and userID) in it and do the same sort of thing.

-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux