This query on php admin works perfectly fine SELECT a.*, Count(b.status) as counttotal FROM holidays a LEFT JOIN attendances b on a.month_id=b.month_id GROUP BY a.month_id
This query executes in php my admin but i tried the same to check through php artisan tinker but this gives error of
Illuminate\Database\QueryException with message 'SQLSTATE[42000]: Syntax error or access violation: 1055 'school_blog.a.month' isn't in GROUP BY (SQL: SELECT a.*, Count(b.status) as counttotal FROM holidays a LEFT JOIN attendances b on a.month_id=b.month_id GROUP BY a.month_id)'
Please help me out. check the screen shot of erroe msg
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire