if ( $nickname != '' ) {
$where .= " and CONCAT(a.nickname,a.mobile, a.card_number) like '%" . $nickname . "%'";
}
和
$where .= "and (a.nickname like '%{$nickname}%' or a.mobile like '%{$nickname}%' or a.card_number like '%{$nickname}%')";
的效果是一样的 明显上面的写法简单多了
2 回答
- 2 回答
- 0 关注
- 498 浏览
添加回答
举报
0/150
提交
取消