-5
My Query:
select id from clientes where cliente = '$cliente' AND status = '2' AND
(tipo <> '0' AND (disponibilidade <> '0' OR vanual <> '0' OR vtemporada <> '0'))
I need it to work this way:
Which displays some record if the field TYPE for non-zero and that at least one of the camps: availability, vanual and vtemporada have any value other than zero.
That is, for it to display some record the field TYPE it is obligatory to be different from ZERO and also some of the fields availability, vanual and vtemporada have any value other than zero
Only this SQL I built doesn’t do that!
I’m waiting for help please!
There is already a topic where you asked the same thing, haha. Try to use it yourself to try to solve. I’m even posting there trying to help you. This is the link to the other post: http://answall.com/questions/118230/comorvalidar-alguns-campos-em-sql/
– Márcio Lordelo
Put the table structure.
– Marcelo de Andrade