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

CREATE TABLE `board_papers` (
 `id` int(4) NOT NULL auto_increment,
 `doc_date` varchar(10) NOT NULL default '0000-00-00',
 `article_type` enum('agenda','minutes','paper') NOT NULL default 'agenda',
 `fileName` varchar(50) NOT NULL default '',
 `fileSize` int(4) NOT NULL default '0',
 `fileType` varchar(50) NOT NULL default '',
 `content` blob NOT NULL,
 `item_id` int(10) default NULL,
 PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to