Help !! About mysql database
Posted: Tue Dec 28, 2010 9:19 am
Hi, I'm shibbir, new in this forum. I have some problem about my database. The problem is..
I have a database table name 'registration' and there is 10 fields. first field name is ' id '. and then I insert data to this table. It's increase id..like 1, 2, 3, 4, 5, 6.... but...
when i delete id from database like 'id- 6' then it delete id 6. The main problem is when i again insert data to this table it show it's id number is 1,2.3,4,5,7. but i want to make this Sequentially..like 1,2,3,4,5,6,7,8,9....Please anyone help me.
here is my table structure...
--------------------------------------------------------
--
-- Table structure for table `registration`
--
CREATE TABLE IF NOT EXISTS `registration` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`pass` char(40) NOT NULL,
`reppass` char(40) NOT NULL,
`email` varchar(20) NOT NULL,
`address` varchar(100) NOT NULL,
`phone` int(20) NOT NULL,
`jdate` date NOT NULL,
`ip` int(20) NOT NULL,
`uplimg` varchar(200) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
--
-- Dumping data for table `registration`
--
INSERT INTO `registration` (`id`, `name`, `pass`, `reppass`, `email`, `address`, `phone`, `jdate`, `ip`, `uplimg`) VALUES
(3, 'rakib', 'shibbir', 'shibbir', 'shibbi@yahoo.com', '22/2 Moneshwar Road, Zigatola, Tennarymore.', 222, '2002-12-10', 1270, ''),
(7, 'shibbir', '123456', '123456', 'shibbi@yahoo.com', '22/2 Moneshwar Road, Zigatola, Tennarymore.', 222, '2002-12-10', 1270, '');
Thanks for help.
I have a database table name 'registration' and there is 10 fields. first field name is ' id '. and then I insert data to this table. It's increase id..like 1, 2, 3, 4, 5, 6.... but...
when i delete id from database like 'id- 6' then it delete id 6. The main problem is when i again insert data to this table it show it's id number is 1,2.3,4,5,7. but i want to make this Sequentially..like 1,2,3,4,5,6,7,8,9....Please anyone help me.
here is my table structure...
--------------------------------------------------------
--
-- Table structure for table `registration`
--
CREATE TABLE IF NOT EXISTS `registration` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`pass` char(40) NOT NULL,
`reppass` char(40) NOT NULL,
`email` varchar(20) NOT NULL,
`address` varchar(100) NOT NULL,
`phone` int(20) NOT NULL,
`jdate` date NOT NULL,
`ip` int(20) NOT NULL,
`uplimg` varchar(200) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
--
-- Dumping data for table `registration`
--
INSERT INTO `registration` (`id`, `name`, `pass`, `reppass`, `email`, `address`, `phone`, `jdate`, `ip`, `uplimg`) VALUES
(3, 'rakib', 'shibbir', 'shibbir', 'shibbi@yahoo.com', '22/2 Moneshwar Road, Zigatola, Tennarymore.', 222, '2002-12-10', 1270, ''),
(7, 'shibbir', '123456', '123456', 'shibbi@yahoo.com', '22/2 Moneshwar Road, Zigatola, Tennarymore.', 222, '2002-12-10', 1270, '');
Thanks for help.