I would like to select all resources that published date is July
how can i do that in MODX Revolution ?
i tried :
$query = $modx->newQuery('modResource');
$query->where( array( 'month(FROM_UNIXTIME(publishedon))' => 7 );
$resources = $modx->getCollection('modResource',$query);
but it doesn't work.
i am new using MODX
so what can i do ?
you can try:
$month = 7;
$query->where("MONTH(FROM_UNIXTIME(publishedon)) = " .$month, xPDOQuery::SQL_AND);