Answer the question
In order to leave comments, you need to log in
1055 Expression #19 of SELECT list is not in GROUP BY clause and contains nonaggregated column?
$query = DB::table('courses')
->select('courses.*','course_topics.course_id', 'users_courses_progress.progress', 'users_courses_progress.course_id')
->join('course_topics', 'courses.id', '=', 'course_topics.course_id')
->leftJoin('users_courses_progress', 'courses.id', '=', 'users_courses_progress.course_id')
;
$status = 'New';
dd($query->where('status', $status)->groupBy('courses.id')->get());
// в groupBy ошибка. Как устранить?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question