I know I'll get flamed for askign such a simple question, but here goes...
I have a MySQL DB and wanna increment a field 'id_number' by one each
time, to avoid creating duplicates...
I've done it before, but can't remember how...
Any ideas?
Tris...
PROTECTED]
Subject: [PHP-DB] Auto inc in MySQL
I know I'll get flamed for askign such a simple question, but here goes...
I have a MySQL DB and wanna increment a field 'id_number' by one each
time, to avoid creating duplicates...
I've done it before, but can't remember how...
Any ideas?
Tris
Tris,
make the the field, id_number, an auto_increment field.
[EMAIL PROTECTED] on 07/09/2003 07:44:34
AM
To: [EMAIL PROTECTED]
cc:(bcc: David P. Giragosian/MDACC)
Subject: [PHP-DB] Auto inc in MySQL
I know I'll get flamed for askign such a simple question, but here goes
Stan Lemon wrote:
Also, I believe in addition to AUTO_INCREMENT it has to be UNIQUE as
well. Please correct me if I am wrong.
No, just INDEX. UNIQUE will work fine, but I reccomend making it PRIMARY.
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to