SELECT PM.*, promotion_type.type_name, country.country_name, province.province_name,
region.region_name, towncity.towncity_name FROM promotion As PM
join country on PM.country_id=country.id
join province on PM.province_id=province.id
join region on PM.region_id=region.id
join towncity on PM.towncity_id=towncity.id
join promotion_type on PM.promotion_type=promotion_type.id
where PM.category_id in('".$catarray."')";
答案 0 :(得分:0)
使用$catarray
时,这可能会帮助您 -
PM.category_id in('".implode(",", $catarray."'))
$array = array('lastname', 'email', 'phone');
$comma_separated = implode(",", $array);
echo $comma_separated;
输出将是 - lastname,email,phone