Hi guys,
I have a database with hundreds of persons and doing a live-search with ajax.
And I have this query.
The idea is that I do have the test line in the db but it has a status 0, but it is keep showing up in the results even if I do a search based on the status = 1.
What could be my problem in this simple query ?
I've search the forums but status is not an explicit word but only if I use it as a SHOW STATUS
SELECT * FROM contact WHERE status = '1'
AND lower(concat(nume,' ',prenume)) LIKE '%test%'
AND lower(concat(prenume,' ',nume)) LIKE '%test%'
OR functie LIKE '%test%'
OR email LIKE '%test%'
OR compartiment LIKE '%test%'
OR email LIKE '%test%'
OR user_sap LIKE '%test%'
OR atrib LIKE '%test%'
OR user_mtr LIKE '%test%'
OR interior LIKE '%test%'
OR mobil_firma LIKE '%test%'
ORDER BY nume, prenume LIMIT 7