Re: Help with where clause
| From: | Tom Rogers | Date: | Tue, 16 Dec 2003 09:04:38 +0000 |
| Subject: | Re: Help with where clause | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172781@lists.php.net to get a copy of this message | ||
Hi,
Tuesday, December 16, 2003, 6:30:22 PM, you wrote:
RK> I need to know how I can do a where clause in a select statement for mysql
RK> where
RK> one of the fields can have two solutions. In the example below
RK> field3 needs to equal all with a and also all with b. Can this be done and
RK> if so how.
RK> I am stumped on this one.
RK> select * from table where field1= '$this' and field2 = '$that' and field3
RK> =
RK> 'a and b'
probably like:
select * from table where field1= '$this' and field2 = '$that' and (field3 =
'a' or field3 = 'b')
--
regards,
Tom