sorting with php/mysql

2006-05-02 Thread ross
This is my database...I will use the item_id for the order but what if I want to change item_id 3 to item id 1? How can I push all the items down one place? How can I delete any gaps when items are deleted. Say I delete item 2 how can I delted the gap and 'promote item_id 3 to item_id 2

Re: sorting with php/mysql

2006-05-02 Thread Peter Brawley
Ross, This is my database. Nope, it's a table, not a database. ..I will use the item_id for the order but what if I want to change item_id 3 to item id 1? A primary key shouldn't be edited, and the literal value of an auto_increment column oughtn't to be relevant. If you really need a