php How to do multi-condition filtering in the mall?
郭骏博2018-03-20 17:51:16
Multiple conditions are generally related to and, not or
The conditions are all passed through the url, PHP obtains the condition value through get and reads it from the database
炎2018-03-06 16:38:19
Solution for tp framework
$where['Conditional field 1|Conditional field 2'] = array('like', "%query keyword%");
M ('table')->where($where)->select();
Native code
select * from table name where field 1 like %query keyword% or field 2 like %query keyword%