Forum Moderators: open

Message Too Old, No Replies

How do I make sure I exclude 2 values from a select

         

Baruch Menachem

5:34 am on Oct 11, 2009 (gmt 0)

10+ Year Member



Line of code:

$view="select * from products where type <> 1 order by type, price";

I want to exclude two types, 1 & 7. How do I arrange this so I exclude 7 as well as 1. (Seven is not a deal breaker. I can live with it showing up for a while)

bcc1234

1:32 pm on Oct 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



where type not in (1,7)

or

where type<>1 and type<>7

Baruch Menachem

1:47 pm on Oct 11, 2009 (gmt 0)

10+ Year Member



Thanks, I was forgetting the parenthesis.