[TYPO3-mvc] How to add a SQL function in a query

Dirk Rauscher dr_typo3 at itb-institut.de
Fri Sep 16 22:09:25 CEST 2011


Hi guys,

thanks for involving in this problem.
Though your described way looks a littlebit rugged it works!
I'm curious about the typo3 developers to extend the 
Tx_Extbase_Persistence_Query class for some new methods to use sql 
functions?

This way of building sql queries takes some getting used to ;-)

Cheers Dirk

Am 16.09.2011 13:50, schrieb Rayuth You:
> $year = 2011;
> $startTimestamp = mktime(0, 0, 0, 1, 1, $year);
> $endTimestamp = mktime(23, 59, 59, 12, 31, $year);
>
> $query->matching(
> $query->logicalAnd(
> $query->greaterThanOrEqual('crdate', $startTimestamp),
> $query->lessThanOrEqual('crdate', $endTimestamp),
> $query->equals('name','blabla')
> )
> )->execute();



More information about the TYPO3-project-typo3v4mvc mailing list