$in=implode(',',$_POST['id']); //假设复选框name为id[] $sql="select id, group_concat(name) from tt where id in($in) group by id"; ...