Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Registration script that creates many tables?

EDIT: I have solved the original problem, I had a logical error that I didn't notice.

NEW QUESTION:

How can I reset the auto increment on my primary key?

If I have 10 records, and delete them all, and then enter a new record, the id will be 11.... how can I make this AI index reset without deleting everything?
(Mar 9, 2012 12:07 AM)English_Fire Wrote:  EDIT: I have solved the original problem, I had a logical error that I didn't notice.

NEW QUESTION:

How can I reset the auto increment on my primary key?

If I have 10 records, and delete them all, and then enter a new record, the id will be 11.... how can I make this AI index reset without deleting everything?

You can alter the auto_increment value by the following:

Code
ALTER TABLE table_name AUTO_INCREMENT = new_value
<Disease />
(Mar 9, 2012 12:07 AM)English_Fire Wrote:  EDIT: I have solved the original problem, I had a logical error that I didn't notice.

NEW QUESTION:

How can I reset the auto increment on my primary key?

If I have 10 records, and delete them all, and then enter a new record, the id will be 11.... how can I make this AI index reset without deleting everything?

Truncate your MySQL table. It should reset the auto incrementing fields!
(Mar 9, 2012 12:22 AM)Disease Wrote:  You can alter the auto_increment value by the following:

Code
ALTER TABLE table_name AUTO_INCREMENT = new_value

Okay, cool. So what would I put for the value...just 1? and then every after would follow accordingly?

(Mar 9, 2012 03:30 AM)Novalty Wrote:  Truncate your MySQL table. It should reset the auto incrementing fields!

I shall look this up, thanks.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Javascript]  by HiddenWarriorJun 26, 2016 12:51 PM 1 222 Jun 26, 2016 12:51 PM
Last Post: Skullbone
[PHP] by hellomenAug 17, 2014 08:32 AM 0 177 Aug 17, 2014 08:32 AM
Last Post: hellomen
[PHP] by VipVinceApr 23, 2014 05:28 AM 12 289 Apr 23, 2014 05:28 AM
Last Post: Cathal