1
I need to fetch the products from my site.
In it, there are two types: Physical and digital. I would like if the products were physical, to show only those above 0 in stock. If it is digital, there is no need for this stock Where.
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?
Perfect! Thank you very much!
– Maykel Esser