View Single Post
Old 06-10-2008, 08:56 PM   #2 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

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:

Code:
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.
xenon is offline  
Reply With Quote