No, I mean you can use an autoincrement field besides your username field.
and use that to constructing user name,
In this way you will be sure about uniqness and also you can maintain your
user name as a text field although its some sort of redundancy.
Regards
> Hi,
>
> The username field is text and number so you I can't autoincrement a
> username like "abc003434" ...
>
>
> ----- Original Message -----
> From: "Mohammad Shoja" <[EMAIL PROTECTED]>
> To: "anna soobrattee" <[EMAIL PROTECTED]>
> Sent: Wednesday, June 13, 2001 11:57 AM
> Subject: Re: table locking and priorities
>
>
> > Hi Anna,
> >
> > Why you dont use auto increment field,
> > Without a sequence (in Oracle) or Autoincrement (in MySQL) how you will be
> > sure about uniquness of your key ?
> > Mohammad
> >
> >
> > > Hi All,
> > >
> > > Can anyone help me...
> > >
> > > My registration form looks up the last username in the members table
> (select
> > > distinct username from members order by uid desc limit 1), and
> increments
> > > this username (e.g. from abc00002 abc00003) which will be used as the
> > > username for the next user to sign up...
> > >
> > > the problem occurs when in the time it takes to do an insert, several
> > > selects can take place - so i have the case where there are users with
> the
> > > same username (which is not very good at all)
> > >
> > > Can I force the selects to lock, whilst the insert is taking place? Has
> > > anyone got any ideas on how to get aorund this ?
> > >
> > > Please write back soon!
> > > Anna
> > >
> > >
> >
> > ----------------------------------------------------------------------
> > Mohammadreza Shojatalab
> > European Bioinformatics Institute Tel: +44 (0)1223 494 669
> > EMBL Outstation Fax: +44 (0)1223 494 468
> > Wellcome Trust Genome Campus E-Mail: [EMAIL PROTECTED]
> > Hinxton, Cambridge URL: http://www.ebi.ac.uk/~shoja
> > CB10 1SD, UK
> >
> >
>
>
> ---------------------------------------------------------------------
> 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
>
>
----------------------------------------------------------------------
Mohammadreza Shojatalab
European Bioinformatics Institute Tel: +44 (0)1223 494 669
EMBL Outstation Fax: +44 (0)1223 494 468
Wellcome Trust Genome Campus E-Mail: [EMAIL PROTECTED]
Hinxton, Cambridge URL: http://www.ebi.ac.uk/~shoja
CB10 1SD, UK
---------------------------------------------------------------------
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