RE: [PHP-DB] mysql and auto_increment

2002-02-20 Thread Gurhan Ozen

Yes you sure can,..
When you insert a row just use one of the older values that no longer exists
on the table.. Alternatively, you can insert a blank value, mysql will
automatically set it to the next value after the highest one in the table
and then you can update it to one of the older values.

Gurhan


-Original Message-
From: Nautilis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 10:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql and auto_increment


Hi everyone

My question is very simple, so i hope the answer will too :)

Well i have an index field in my table which is set as auto_increment. Well
question is, it's possible that mysql use values that have alredy been
deleted from older regs?

Thx in advance!




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


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




RE: [PHP-DB] mysql and auto_increment

2002-02-20 Thread Rick Emery

First, what do you mean by regs?

If I understand your question, you want to know if mysql will re-use an old
auto_increment value that has been deleted.  The answer is yes and no.
If you say:  DELETE FROM mytable;
then the next insertion will cause the auto_increment value to begin at 1

If you say:  DELETE FROM mytable WHERE myfield0
then the next insertion will cause the auto_increment value to begin where
the auto_increment left off.

-Original Message-
From: Nautilis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 9:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql and auto_increment


Hi everyone

My question is very simple, so i hope the answer will too :)

Well i have an index field in my table which is set as auto_increment. Well
question is, it's possible that mysql use values that have alredy been
deleted from older regs?

Thx in advance!




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

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