Hello,
I need help on something:
I have a form with 3 selects and a textfield, the textfield is to search the terms inserted on some of the fields of the table and the selects are to filter some fields with fixed falues.
I have this query:
select * from stone WHERE activo = 's' and (`nome` LIKE '%stones%') OR (`area_extraccao` LIKE '%stones%') OR (`nomes_alternativos` LIKE '%stones%') OR (`info_tecnica` LIKE '%stones%') OR (`descricao` LIKE '%stones%') OR (`analise` LIKE '%stones%') OR (`acabamentos` LIKE '%stones%') OR (`aplicacoes` LIKE '%stones%') OR (`meta_title` LIKE '%stones%') OR (`meta_desc` LIKE '%stones%') OR (`meta_key` LIKE '%stones%') AND cor_clean = 'beige' AND pais_clean = 'portugal' AND tipo_clean = 'granite' order by id desc LIMIT 0, 20
What i want is to search the keyword only after the 3 filters (cor_clear, pais_ clean and tipo clean) are processed, at the moment they are ignored and i have results from articles that tipo_clean is not granite and the same for others.
can anybody help me on this, please.
thanks