Re: Checking database for a value

From: Date: Sat, 20 Apr 2002 17:10:14 +0000
Subject: Re: Checking database for a value
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93827@lists.php.net to get a copy of this message
On Sunday 21 April 2002 00:55, Denis L. Menezes wrote: > hello friends, > > I am looking into 4 books in front of me but somehow cannot find the > following : > > I have a field userid which the user fills in at registration. Before > entering the data into the database, I want to check if the userid exists > in the database. > > Can someone tell me the name of the function I must use, I will look for > the rest in the php dictionary. AFAIK there are no built-in functions to do that. You need to run a query like "SELECT userid FROM table" then see whether any rows are returned. If you use this often you can wrap it up in a function. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* I'm reporting for duty as a modern person. I want to do the Latin Hustle now! */

« previous php.general (#93827) next »