You are here: Re: Checking for username... « PHP Programming Language « IT news, forums, messages
Re: Checking for username...

Posted by Gordon Burditt on 06/14/05 16:20

>> The database can do this by implementing a unique constraint on the column
>> user_name. After issuing the INSERT, (or any SQL command), check for an
>> error, and report it. This then solves your general problem of enforcing
>> data integrity and reporting errors.
>checking for the SQL error is not a good idea, actually.
>Well known programing prupose to use select before insert.

This has the well-known problem that you may find the name not
in use, insert it, and find the name has been taken before you
got to it - unless you've gotten a lock first.

Gordon L. Burditt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация