Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-24-2005, 07:36 AM auto_increment?
Experienced Talker

Posts: 35
Trades: 0
Hello,

Quick question with auto_increment though.

I have added several records and deleted several records, but the ID automatically created starts at '54' for example - not '1'. How can I force it to start at '1', then the next record '2'?

Thanks

Chris
chrisb is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-24-2005, 08:30 AM
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
This should work:
Code:
ALTER TABLE `whatever` AUTO_INCREMENT=1
This will do the same, but delete all the data as well:
Code:
TRUNCATE TABLE `whatever`
Rufo
__________________

Please login or register to view this content. Registration is FREE

Last edited by Rufo; 06-24-2005 at 08:32 AM..
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Old 06-25-2005, 02:47 AM
rungss's Avatar
Skilled Talker

Posts: 67
Name: Bijay Rungta
Location: Mumbai, India
Trades: 0
Ya that should solve your problem
rungss is offline
Reply With Quote
View Public Profile Visit rungss's homepage!
 
Reply     « Reply to auto_increment?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10895 seconds with 12 queries