jeudi 29 juin 2017

Mysql qu erynot accepting in laravel 5.4

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

phpadmin screenshot here

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



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tsVwcp
via IFTTT

Aucun commentaire:

Enregistrer un commentaire