[TYPO3-dev] Language overlay on query

Pierre Rouwens Pierre_Rouwens at dmr.ca
Mon Oct 1 20:47:20 CEST 2007


Hi again

Ok there was a mistake in my query ... i didn't ask for the proper fields to 
overlay.. i added tx_bulletinsirre_article.* and it works but is this the 
better way to achieve this ?

Thanks

Pierre

"Pierre Rouwens" <Pierre_Rouwens at dmr.ca> a écrit dans le message de groupe 
de discussion : mailman.1.1191263891.27666.typo3-dev at lists.netfielders.de...
> Hi there,
>
> I have this kinf of query :
> $select = 'tx_bulletinsirre_bulletin.code as code, 
> tx_bulletinsirre_bulletin.starttime as date,tx_bulletinsirre_article.uid 
> as uid,tx_bulletinsirre_article.titre as titre';
> $from = 'tx_bulletinsirre_article,tx_bulletinsirre_bulletin';
> $where = 'tx_bulletinsirre_article.sys_language_uid in (0,-1)'.
> ' and 
> year(from_unixtime(tx_bulletinsirre_bulletin.starttime))='.intval($year).
> ' and tx_bulletinsirre_article.parentid=tx_bulletinsirre_bulletin.uid'.
> $this->cObj->enableFields('tx_bulletinsirre_bulletin').
> $this->cObj->enableFields('tx_bulletinsirre_article');
> $order = 'tx_bulletinsirre_bulletin.starttime desc';
> $res = 
> $GLOBALS['TYPO3_DB']->exec_SELECTquery($select,$from,$where,$order,'');
>
> And I need to have an overlay on the field "titre", of course a simple
> $row = 
> $GLOBALS['TSFE']->sys_page->getRecordOverlay('tx_bulletinsirre_article', 
> $row, $GLOBALS['TSFE']->sys_language_content,'');
> doesn't work because the row is not from only one table.
> What is the best way to achieve this ? i've searched withtout any chance.
>
> thanks in advance for any hint.
>
> Pierre 





More information about the TYPO3-dev mailing list