Re: phpMyAdmin--resetting auto increments to 0
| From: | tedd | Date: | Sun, 16 Apr 2006 20:09:23 +0000 |
| Subject: | Re: phpMyAdmin--resetting auto increments to 0 | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-234087@lists.php.net to get a copy of this message | ||
At 1:42 PM -0600 4/16/06, Chuck Anderson wrote:
alex wrote:Chuck: This always works for me in PhpMyAdmin (I mistyped it before). 1. Delete the first record. 2. Reset the auto_increment in Operations to whatever you want. 3. Insert a record. 4. Delete that record. After that, the next record will start at the new auto_increment value. Don't ask why, that's just the way it works. tedd -- -------------------------------------------------------------------------------- http://sperling.comhi 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 alexOn a related note (he did say PhpMyAdmin) ... ALTER TABLE 'tablename' auto_increment=n works, but I can't get PhpMyAdmin to reset the auto_increment through the Operations menu page. If I go to the Operations tab for a table and set the auto_increment value to something less that it currently is, PhpMyAdmin will not honor my request and re-specifies the current auto_increment value in the ALTER TABLE command (even though my requested value is valid). Is this because of a config setting? I could have sworn earlier versions would obey my request.