B
B
BonBon Slick2017-03-24 03:37:28
MySQL
BonBon Slick, 2017-03-24 03:37:28

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

1 answer(s)
A
Alexander Aksentiev, 2017-03-24
@BonBonSlick

https://mattstauffer.co/blog/strict-mode-and-other...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question