Re: phpMyAdmin--resetting auto increments to 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



chris smith wrote:
On 4/16/06, Jim Lucas <lists@xxxxxxxxx> wrote:
Jim Lucas wrote:
alex wrote:
hi everyone

i have delete a few entries in my database as they were entered for
testing purposes and are no longer need (actually 102 entries)... and
even thought that db is empty i noticed that when the next entry went
in the id number went to 103
not 0 so i was wondering is it possible to somehow reset the value to
zero...

it is of int type and auto_increment

i have a few db's which id like to reset to zero i have tried placing
a zero enrty after deleting the lot but it only jumps to  its next
increment.
does anyone know what i mean...?
any help will be grateful
regards alex

At the top of the Structure page ( or any other when viewing a
detailed table view) you should have an Empty tab at the top left.
Hit that and it should reset the counter

also running the command:  DELETE FROM `table_name`
from the SQL box, should do the same trick

That won't reset the counter.

You'll probably need to do this after you delete all the data:

update table set id=0;

--
Postgresql & php tutorials
http://www.designmagick.com/

Well, I just tried it on a temp table that I have for my blog under Mysql and it did reset the autoindex to 1.
Seems to work the way I said.

Jim

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux