So you have one table with the fields 'email' and 'nickname' (perhaps others too) and and given:
$email = '[EMAIL PROTECTED]' $nickname = 'stinky' You wish to be sure that no other record has either that email _or_ that nickname. Correct? You could run: select * from <table> where email = $email or nickname = $nickname Now this would return rows if either was true and the only way you could tell would be to look at the results and compare those fields to the values you already have. If the results are empty then it's cool - there aren't any rows with these values. Otherwise if you want two results use two queries. Good Luck, Frank On 3/27/02 12:27 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > From: "Dave Carrera" <[EMAIL PROTECTED]> > Date: Wed, 27 Mar 2002 08:27:21 -0000 > To: <[EMAIL PROTECTED]> > Subject: Checking for 2 unique row contents > > Hi all > > > > I am trying to create a registration area that uses a nickname and email > pair. > > > > I need both to be unique. > > > > So how do I that either do not already exist then if unique insert into > db. > > > > So > > if nickname exist then error = "sorry..." > > if email exist then error = "sorry..." > > else must be unique > > insert. > > > > I have been trying for hours know but cant get the twin check to work. > > > > Can get single check to work though. > > > > I thank you in advance for any thoughts or code examples > > > > Dave Carrera > > Php Developer > > http://davecarrera.freelancers.net > > http://www.davecarrera.com -- Frank Flynn Poet, Artist & Mystic -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php