RE: [PHP] reset auto_increment field mysql
| From: | Claudiu | Date: | Tue, 12 Mar 2002 14:51:10 +0000 |
| Subject: | RE: [PHP] reset auto_increment field mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88207@lists.php.net to get a copy of this message | ||
I wish it was that simple...
No.. It doesn't work this way...
On Tue, 12 Mar 2002, Rick Emery wrote:
> your query is: DELETE FROM mytable;
>
> -----Original Message-----
> From: Claudiu [mailto:yonix@1a.ro]
> Sent: Tuesday, March 12, 2002 5:09 AM
> To: php-general@lists.php.net
> Subject: [PHP] reset auto_increment field mysql
>
>
> I have a mysql table which contains an id field which is set to
> auto_increment.
> I have a script which empties this database at regular intervals.
> My problem is that the auto_increment field won't reset to 0 after
> deleting all of tha data, but continue incrementing from where it left.
>
> How can i solve this problem..
> I want id to reset to 0 when i delete the contents of the table.
> Can someone help?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>