This is a fundamental problem -- are you changing the IDs of the list  
in order to keep the order correct? IDs are once-in-a-lifetime things,  
they should never change, unless you want your hair to stop growing.

Make a new column in your database just to hold the current sort order.

table "widgets":

        id int(11) auto-increment, primary key
        name varchar(255)
        price decimal (8,2)
        description text
        position int(11)
        updated_at datetime

To draw your list, SELECT * FROM widgets ORDER BY position ASC.


On May 29, 2009, at 8:50 AM, WLQ wrote:

> Of course then it must update and rebuild the list using the order
> defined by the item ID.

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to