[TYPO3-mvc] [Extbase] Repository & SQL Functions
Stefano Cecere
scecere at krur.com
Tue Dec 11 18:33:34 CET 2012
Hi Claus
luckily we can use any direct mysql, like:
/**
* @return array
*/
public function findMyQuery() {
$query = $this->createQuery();
$query->getQuerySettings()->setReturnRawQueryResult(TRUE);
$query->statement("SELECT DATE_FORMAT( FROM_UNIXTIME( `crdate` ) ,
'%Y' ) AS Datum FROM tt_content group by Datum");
return $query->execute();
}
it'll return an array
On 11/12/12 17:07, Claus Fassing wrote:
> Hello,
>
> is it possible to use SQL Functions from repositorys ?
> e.g.
> SELECT DATE_FORMAT( FROM_UNIXTIME( `crdate` ) , '%Y' ) AS Datum
> FROM tt_content group by Datum
>
> Or do I have only the statement method for this on hand ?
>
> Regards,
>
> Claus
>
>
--
-- --- ----- -------
Stefano Cecere
KRUR studio - http://krur.com
More information about the TYPO3-project-typo3v4mvc
mailing list