Laravel 5.3问题不允许在所有字段中使用groupBy
$response = \DB::table("posts")
->select("posts.id", "posts.roll_no",\DB::raw("GROUP_CONCAT(tags.name) as tagsname"))
->leftjoin("tags",\DB::raw("FIND_IN_SET(tags.id, posts.send_to)"),">",\DB::raw("'0'"))
->groupBy(["posts.id", "posts.roll_no"])
->get();
为什么我需要在groupB中调用“ posts.id”,“ posts.roll_no”?如果-> select(“ posts.id,*”,我删除了那些会产生错误的信息,请指导谢谢