Hi I was wondering if this type of query is possible?

SELECT `Listing` . *
FROM `Listing`
LEFT JOIN `CurrencyItem` ON `Listing`.`CurrencyID` =
`CurrencyItem`.`ID`
WHERE
IF `CurrencyItem`.`Name` = 'NZD'
THEN `Listing`.`ProductPrice` > '0'
AND `Listing`.`ProductPrice` < '10000'
ELSEIF `CurrencyItem`.`Name` = 'USD'
THEN `Listing`.`ProductPrice` > '0'
AND `Listing`.`ProductPrice` < '5348'
ELSEIF `CurrencyItem`.`Name` = 'AUD'
THEN `Listing`.`ProductPrice` > '0'
AND `Listing`.`ProductPrice` < '8004'
END IF
LIMIT 0 , 10

And if not, would there be any query I could dynamically generate which
achieved the same result?
Cheers,
Cam

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to