I need to get the products from my site.
In it, there are two types: Physical and digital . I would like that if the products were physical, show only those that had above 0 in the stock. If it is digital, you do not need this Where in stock.
I'm doing it this way, but it's obviously giving Syntax Error.
SELECT * FROM sistema_produto p
WHERE proAtivo = 'S'
AND proExcluido = 'N'
AND (
CASE 'proTipo' = "F" THEN proEstoque > 0
)
Where am I going wrong?