Ordering using up/down arrows
View Single Post
06-10-2008, 08:56 PM
Join Date: Dec 2007
Location: Bucharest, Romania
Well, when you delete a record, you need to set all the other records after the deleted record's order to order-1. Example: say you have 5 items. The item with the id 3 has the order number 2. After you issue the delete statement, run this aswell:
UPDATE items SET theorder=theorder-1 WHERE theorder > deleted_record_order
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
View Public Profile
Send a private message to xenon
Visit xenon's homepage!
Find More Posts by xenon