select type,sum(stat_count) as stat_count from t_stat_day_type where stat_time>='$start' and stat_time<'$end' $where1 and type in ($search) GROUP BY type