Would it be possible to create an IF statement in a WHERE clause, I would need something like this in order to filter a certain product.
For example if product 005 has a ranking of 100 or less than the product should not show up in my query results
For example…
SELECT b.id, b.rank
FROM b_products b
WHERE IF(b.id = '005' AND b.rank < 100, b.id != '005')
The IF() function expects three arguments, not two:
However, you haven’t described anything that cannot be accomplished with a proper boolean expression: