[TYPO3-english] QueryResultInterface for latest tt_content images
    Sergio Catalá 
    scatala.enet at gmail.com
       
    Sun Jul 13 14:33:14 CEST 2014
    
    
  
Hi list,
I've built a new extension that maps tt_content table. I would like to 
get the images from the latest created tt_content elements.
I would like to transform this SQL sentence:
     SELECT tt_content.image
     FROM (SELECT * FROM tt_content ORDER BY tt_content.crdate DESC) 
tt_content
     GROUP BY tt_content.pid, tt_content.sys_language_uid
     HAVING tt_content.pid in (2,3,4,5) AND tt_content.sys_language_uid = 0
     LIMIT 0,4
into a QueryResultInterface for my content repository.
But I am not sure if I can use GROUP and HAVING clausules with existing 
functions for the $query.
I saw I can use a "raw sql" through statement() function, but I don't 
want to use that.
Is this possible?
Thanks in advance,
Sergio
    
    
More information about the TYPO3-english
mailing list