The most lovely feature of auto_increment is one of the reasons why we
switched from interbase to mysql. Instead of having to call a stored
procedure every time you need a unique id, or obtain one by triggers, or
create a semi-unique one the way you do, one just have a flexible and
controlable unique id function :)
So i strongly disagree the unwantedness of auto_increment. at least: you
dont have to use it if you don't like to, as you proved by a simple client
side function.


----- Original Message -----
From: "Roger Ramirez" <[EMAIL PROTECTED]>
To: "Viken Nokhoudian" <[EMAIL PROTECTED]>
Cc: "MySQL List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 11:07 PM
Subject: RE: Auto-Increment - how can I avoid repeating IDs?


> Use your own id's.  I personally hate auto increment.  I do all my work in
> php so I make my id's like this.
>
> srand(time());
> $id = md5(uniqid(rand()));
>
> This will make a 32 character id.
>
> > -----Original Message-----
> > From: Viken Nokhoudian [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 30, 2001 3:58 PM
> > To: [EMAIL PROTECTED]
> > Subject: Auto-Increment - how can I avoid repeating IDs?
> >
> >
> > I am using MySQL ver. 3.22.32
> >
> > When a table has an auto-incrementing ID field and the last inserted
> > record had an ID of, say, 100, then I delete that record, the database
> > engine will re-use the 100 value. How can I get the engine to never
> > repeat an ID value to avoid corrupted data correlations?
> >
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> > <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to