[TYPO3-mvc] How to create join query with group by in extbase

desh.naik at lelesys.com desh.naik at lelesys.com
Wed Jun 23 10:20:11 CEST 2010


hello

I was trying to developed a extension with extbase a new way of  
developing front end plugin . I liked the way it is done specially  
bcoz it is in MVC structure .
but i got a problem while doing a join query in the repository .

My query is as follow

"SELECT first_table.*,count(second_table.uid) as issuecount FROM  
first_table JOIN second_table ON first_table.uid =  second_table.pid  
GROUP BY second_table.pid "

I tried running this query with

$query->statement("SELECT first_table.*,count(second_table.uid) as  
issuecount FROM first_table JOIN second_table ON first_table.uid =   
second_table.pid GROUP BY second_table.pid")->execute;

the query is running fine but it doesnot return the value of  "  
count(second_table.uid) as issuecount " in the object

So does any body know how to write the join query with group by in  
extbase style .

Thanks


More information about the TYPO3-project-typo3v4mvc mailing list