[TYPO3-mvc] Using SQL count function in ExtBase query
Michael Knoll
mimi at kaktusteam.de
Wed Aug 18 14:55:16 CEST 2010
Hi there,
I would like to do a query like
SELECT group.name, count(*) as row_count FROM users
JOIN group ON users.group_id = group.id
GROUP BY group.id
(might not be syntactically correct, but I hope you get the idea).
Is there any possibility to do that with extbase query object?
The only workaround I can think of would be to select all groups first
and then do a count using group ID for each record what would end up
with lots of queries sent to the database...
Thanks for your help!
Greetings
MImi
More information about the TYPO3-project-typo3v4mvc
mailing list