php - Laravel - Group By error on query that works on phpmyadmin with results -
the query is:
$last_topics = topics::orderby('date', 'desc')->groupby('section')->get();
and error:
so on error can see query is: select * from
topicsgroup by
sectionorder by
datedesc
but can see same query in phpmyadmin works great, , have result
so what's wrong?
i addition can without groupby in query inside laravel doesn't alert error, like: $last_topics = topics::orderby('date', 'desc')->get();
but said in phpmyadmin same query groupby works great
ok mode in database being used within database config /config/database.php
. laravel not adding columns group by.
'connections' => [ 'mysql' => [ // work 'strict' => false, // wont work 'strict' => true, ] ]
Comments
Post a Comment