Re: name already in use....

From: Date: Fri, 24 Nov 2000 09:41:56 +0000
Subject: Re: name already in use....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-26918@lists.php.net to get a copy of this message
This should be as easy as putting this in your table def: UNIQUE ID (name) or just add: KEY (name) Which will add another key on "name" then just do queries on that name so if I sign up for joestump98 and joestump98 is already taken then your mysql_num_rows will tell you that. --Joe On Fri, Nov 24, 2000 at 01:26:34AM -0800, Thomas Edison Jr. wrote: > i'm building a chatroom. there's one problem of > duplicate names. I cannot make the 'name' field a > primary key due to some reason. i want to check the > incoming name being entered with all the names > previously entered in each row of the 'name' field and > give a desired response if the name already exists. > > I tried with mysql_fetch_array ... but it's only > checking with the first row's data ..and not going to > the rest of the rows.... > > help appreciated!! > > T. Edison jr. > > > ===== > Rahul S. Johari (Director) > ****************************************** > Abraxas Technologies Inc. > Homepage : http://www.abraxastech.com > Email : abraxastech@yahoo.com > Tel : 91-4546512/4522124 > ******************************************* > > __________________________________________________ > Do You Yahoo!? > Yahoo! Shopping - Thousands of Stores. Millions of Products. > http://shopping.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net ================================================================================ = Joe Stump joestump98@yahoo.com http://www.miester.org = ================================================================================ Need a programmer? http://www.google.com/search?q=joe+stump+resume

« previous php.general (#26918) next »