把查询数组条件转换成MYSQL in范围查询可以使用
$finStr='"'.implode('","',$finA).'"'; //"187","877","770","707","070","701","019","199","995" $sql2 = "SELECT h.haoma,d.title,d.desc FROM `shuanm_haoma` as h LEFT JOIN `shuanm_haoma_data` d ON h.data_id=d.id where h.`haoma` in({$finStr}) order by field(h.`haoma`,{$finStr})";
如果本文对你有帮助,欢迎打赏本站