我有这个客户表:
+----------+----------+---------+
| cliecode | cliename | deleted |
+----------+----------+---------+
| 00001 | ABC | |
| 00002 | DEF | |
| 00003 | GHI | yes |
| 00004 | JKL | |
+----------+----------+---------+
我正在执行这样的搜索查询:
SELECT *
FROM client
WHERE deleted =''
AND cliecode LIKE '%$_POST[key]%' OR cliename LIKE '%$_POST[key]%'
我想deleted = ''
在条件之前获取第一个like
。我怎样才能做到这一点?谢谢。