Current location: Hot Scripts Forums » Programming Languages » PHP » Autonum in mysql table


Autonum in mysql table

Reply
  #1 (permalink)  
Old 09-24-03, 11:54 AM
pk_jsp pk_jsp is offline
Newbie Coder
 
Join Date: Sep 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Autonum in mysql table

Hi all
Is there a way to set the autonumber field of a table .I mean I if a table contains 20 records and a new record gets 21 as autonum field.
If I delete first 10 records isit possible that it adjusts itself so that new records start form 11 instead of 21

Prashant Dubey
Reply With Quote
  #2 (permalink)  
Old 10-11-03, 04:32 PM
mdhall's Avatar
mdhall mdhall is offline
Aspiring Coder
 
Join Date: Oct 2003
Posts: 510
Thanks: 1
Thanked 1 Time in 1 Post
If you are talking about the auto-increment, no. Each new row added gets the next id number counting upward. So if you have 21 rows, then delete the first 10, the next row will still get the number 22. Mysql doesnt go back to fill the open id numbers, as far as I know.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
great product for dumping/recovering MySQL databases Dave Brown General Advertisements 1 10-03-03 07:40 AM
moving data from table to table ..please help! geneane ASP 2 09-22-03 07:02 PM
MySQL with PHP question. HELP for a newbie kenfused PHP 3 08-02-03 12:53 AM
Privacy in MySQL Database GDLK PHP 3 06-16-03 11:45 AM


All times are GMT -5. The time now is 06:18 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.