On Sunday 21 April 2002 01:10, Jason Wong wrote:
> 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.

That of course should be:

  "SELECT userid FROM table WHERE userid='user_id_to_check'"

I better get some sleep :)

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Delta: We never make the same mistake three times.   -- David Letterman
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to