如何理解 CONCAT

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}%')";

的效果是一样的 明显上面的写法简单多了

开满天机
浏览 499回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP