if(count($_POST["search"]) > 0) {
$arrayString = implode("','",$_POST["search"]) ;
}
//echo $arrayString;exit;
$sql="SELECT * FROM domain_inventory_Global_History WHERE company_domain in ('$arrayString') ";
echo $sql;
答案 0 :(得分:0)
您可以使用LIKE运算符来处理。例如
$sql="SELECT * FROM domain_inventory_Global_History WHERE company_domain LIKE %$arrayString%"
答案 1 :(得分:0)
$ searchStrings = ['google.com','yahoo','fa'];
$ sql =“ SELECT * FROM domain_inventory_Global_History WHERE where company_domain like%”。implode(“%or company_domain like%”,$ searchStrings)。“%”;
echo $ sql;