Open Oreolek opened 8 years ago
ERROR: column "categories.lft" must appear in the GROUP BY clause or be used in an aggregate function
PHP code: $model->children()->count()
$model->children()->count()
SQL code: SELECT COUNT(*) FROM "modeltable" WHERE (("lft" > 2) AND ("rgt" < 3)) AND ("root"=375) ORDER BY "lft"
SELECT COUNT(*) FROM "modeltable" WHERE (("lft" > 2) AND ("rgt" < 3)) AND ("root"=375) ORDER BY "lft"
Workaround (if this won't get a fix): children()->orderBy(NULL)->count()
children()->orderBy(NULL)->count()
ERROR: column "categories.lft" must appear in the GROUP BY clause or be used in an aggregate function
PHP code:
$model->children()->count()
SQL code:
SELECT COUNT(*) FROM "modeltable" WHERE (("lft" > 2) AND ("rgt" < 3)) AND ("root"=375) ORDER BY "lft"
Workaround (if this won't get a fix):
children()->orderBy(NULL)->count()