[TYPO3] First Extension attempt
Dmitry Dulepov [typo3]
dmitry at typo3.org
Wed Mar 12 14:56:02 CET 2008
Hi!
Stephen Bungert wrote:
> I trying to make my first extension. When I try and view the page I see
> this:
>
> NO entry in the $TCA-array for the table "tt_news_related_mm". This means
> that the function enableFields() is called with an invalid table name as
> argument.
>
> What exactly does this mean?
>
> This was the code that made it:
>
> $this->query = $this->pi_exec_query("tt_news_related_mm", 0, '`uid_local`
> =1', '', '', '', '');
>
> What I want to do is just query the database. The table tt_news_related_mm
> seems to store the related artcile IDs fort t_news articles. I want to get
> the related ids so that I can display the related articles for a TT_news
> article in SINGLE view in the right column.
Use $GLOBALS['TYPO3_DB'] (class.t3lib_db.php) to query mm table. MM tables are different, they are not defined in TCA and pi_exec_query will not work for them.
Btw, you use double quotes while you should use single. Check TYPO3 coding guidelines.
--
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"Nothing is impossible. There are only limits to our knowledge"
More information about the TYPO3-english
mailing list