Board index   FAQ   Search  
Register  Login
Board index php forum :: Database phpMyAdmin

change id numbers back in order

How to use phpmyadmin.... phpmyadmin related arguments. Even phpMyAdmin issues

Moderators: macek, egami, gesf

change id numbers back in order

Postby bufhal » Fri Sep 24, 2004 7:06 am

Hello;
I have a mysql database and using phpmyadmin to add records to a table. I started off with and id (primary key) of 001 and the records were all in order up to 350. Then I added more records all at once and now my id's are scattered and not on order. Is there anyway to change the id's (all at once) so the record and record id's are in order with no skipped id's?
If you have any questions--let me know.
Thank you in advance for any help. :)
bufhal
New php-forum User
New php-forum User
 
Posts: 37
Joined: Tue May 04, 2004 5:11 pm

Postby swirlee » Mon Sep 27, 2004 6:43 am

You could do this with a PHP script, but why bother? You shouldn't rely on AUTO_INCREMENT IDs to be contiguous. auto_increment is for providing uniqueness, not continuity. I can't think of a situation in which it would be a hindrance to have "holes" in your IDs, though I'm open to suggestion.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby bufhal » Mon Sep 27, 2004 6:52 am

thank you..your right. And I am new to this -just foun total records.im all set
bufhal
New php-forum User
New php-forum User
 
Posts: 37
Joined: Tue May 04, 2004 5:11 pm


Return to phpMyAdmin

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.