I have this client table:
+----------+----------+---------+ | cliecode | cliename | deleted | +----------+----------+---------+ | 00001 | ABC | | | 00002 | DEF | | | 00003 | GHI | yes | | 00004 | JKL | | +----------+----------+---------+ And I'm performing a search query like this:
SELECT * FROM client WHERE deleted ='' AND cliecode LIKE '%$_POST[key]%' OR cliename LIKE '%$_POST[key]%' I want to fetch the deleted = '' first before the like condition. How can I do this? Thanks.