//组合查询条件
$where ="is_show = :is_show and is_del= :is_del and ti
//如果存在旧的轮播,将排除
if($old_article_id){
$where .= " and activity_id not in (:activity_id)";
$str = "";
foreach($old_article_id as $v){
$str .= "{$v},";
}
$bind[":activity_id"]= rtrim($str,",");
}
//查出显示、没有删除、开启、
$bind[":is_show"] = 1;
$bind[":is_del"] = 0;
$bind[":ti
$lists = $db ->where($where)->bind($bind)->field("ti
SELECT `ti
ti
最佳答案