Re: Logicproblem in WHERE statement

From: Date: Thu, 17 Jan 2002 03:41:54 +0000
Subject: Re: Logicproblem in WHERE statement
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-15910@lists.php.net to get a copy of this message
On Thursday 17 January 2002 06:27, Jaime A. Chavarriaga L. wrote: > Jason > > > SELECT * FROM TABLE > > WHERE sex = 1 OR country = 'CA'; > > > > Will select all users who are female as well as all users from Canada. > > You may get duplicate records (for people who are female and from Canada) > > so > > you > > > may want to use DISTINCT as well. > > ok... you are right... but this error (duplicated rows) just can be > possible if you are selecting several tables, the data rows are not unique, > or you are making some kind of join Ah yes, I forgot we're only using a single table here <sheepish grin> -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* The heart has its reasons which reason knows nothing of. -- Blaise Pascal */

« previous php.db (#15910) next »