I apologize if this message is a repeat; I've had trouble posting with 
Thunderbird.

I'm interested in how you folks would approach the following issue:

You have a list of data, in a user-defined sequence.  For instance, a list 
of song titles that can be rearranged on a web page in any order. I don't 
think I have the best grasp of the logic involved, and as such, the problem 
is a real pain for me.  I use this approach:

-If adding, records after or equal to the new (requested) spot are 
incremented
-If moving up, records before the current spot and after or equal to the 
new spot are incremented
-If moving down, records after the current spot and before or equal to the 
new spot are decremented
-If deleting, records after or equal to the current spot are decremented

Is there some MySQL or PHP function that will handle this sort of 
reordering business, or is there possibly a simpler logic I could use?

Thanks,
Matt
[EMAIL PROTECTED]

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

Reply via email to