我正在尝试在 mysql 中使用 LIKE 语句
我要搜索的值是
前任:
(999) 999-9999
(999) 888-8888
(888) 888-8888
(888) 999-9999
当我试图搜索
(888) or (999)
它显示得很好,但是当我搜索时
999-9999 or 888-8888
值不会显示
数据库的php脚本:
if($area != "" & $phone != ""){
$phone = $area.' '.$phone;
$s_phone = " AND pros_num ='$phone'";
}else if($area == "" & $phone != "")
$s_phone = " AND pros_num LIKE '$phone%'";
else
$s_phone = " AND pros_num LIKE '$area%'";