[TYPO3-mvc] Using SQL count function in ExtBase query

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Aug 19 15:51:12 CEST 2010


Hey,

>> $query = $this->createQuery();
>> return $query->statement('SELECT ...')->execute();
>>
>>
>> If you just like to use the QOM to build such a query (so outside of a
>> repository) it should be possible, but I can't tell you how as I'm not
>> too familiar with internals of the QOM layer yet.
>
> Hey Franz,
>
> thanks for your suggestion, I didn't think about that, but as I cannot
> use domain objects to be mapped on the results, this will work fine!

ok, then you can't use the suggestion above, as extbase will try to map 
the results to a domain object (except if you instantiated a custom 
QOM). In that case easiest would be to use $GLOBALS['TYPO3_DB'] just 
like before, although not the nicest way.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list