Jump to content


Photo

reset id's


  • Please log in to reply
5 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 04 August 2006 - 03:12 PM

I like resetting my database's completely before going live, but I have a question for now.  How do I figure out how to reset the id's on my auto-incremented fields.  I have 1 auto-incremented id field for almost every table, but I like resetting those id's before everything goes live so that start counting back from one, how do I do this using phpmyadmin.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 cmgmyr

cmgmyr
  • Members
  • PipPipPip
  • Advanced Member
  • 1,278 posts
  • LocationUSA

Posted 04 August 2006 - 03:15 PM

If you are using phpMyAdmin all you have to do is "Empty" each table and it will reset it.

-Chris

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 04 August 2006 - 03:23 PM

emtpy?  if you mean removing everything from the table, I delete it all and it doesn't reset, is there an option called empty, where do I find this.??

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 04 August 2006 - 03:24 PM

ah, I see that, thank you for the advice, it is appreciated.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#5 cmgmyr

cmgmyr
  • Members
  • PipPipPip
  • Advanced Member
  • 1,278 posts
  • LocationUSA

Posted 04 August 2006 - 03:25 PM

No problem it should have been a tab up at the top.

You can also go into the operations tab and there is a spot where you can change the auto inc number.

-Chris

#6 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 04 August 2006 - 09:10 PM

"TRUNCATE TABLE" is the MySQL command you seek.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users