If statement in SQL where clause
Hi,
I am running a multi language site. I want to disable one product for all languages except German. Therefor I set up a field "disable" in the table "tblproduct". All products have a "0" except the product I do not want to display.
This disables the product for every language:
SELECT tblproduct.disable
WHERE tblproduct.disable = 0
I would like the conditional statement not to work, when German ist set. I thought something like:
SELECT tblproduct.disable
WHERE (IF varlanguageID <> 1 THEN tbleproduct.disable = 0)
Of course it doesn't work, since I do not really know much about SQL. I read a lot about CASE statements, but could just not get it to work ... syntax error.
Could someone please help me?