Hi Thomas
You cannot use php code in typoscript. This is the typoscript equivalent
to your code below (not tested):
lib.drilllist = CONTENT
lib.drilllist {
table = Strukturtx_drillings_domain_model_drillcat
select {
selectFields = categorytitle
orderBy = categorytitle ASC
}
renderObj = TEXT
renderObj.field = categorytitle
renderObj.wrap = |<br />
}
I'd suggest reading some documentation for a better understanding of
TYPO3, like those:
http://docs.typo3.org/typo3cms/GettingStartedTutorial/Templates/Index.html
http://docs.typo3.org/typo3cms/TyposcriptReference/
Regards, Christian
On 26.09.13 12:10, Thomas Petersen wrote:
Hi Im new to Typo3.
I need to get some date from a DB, and i have added the tables ex.
I have then under "link"->"Template" made this TS-script "soccerlist".
lib.drilllist = CONTENT
lib.drilllist {
//Select Query
$res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db, 'SELECT categorytitle FROM
Strukturtx_drillings_domain_model_drillcat WHERE hidden=0 ORDER BY
categorytitle ASC');
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
echo $row['categorytitle'].'<br />';
}
}
I have then added the template to the maintemplate under "Include Basis
Template:"
And then i have added the following code to my "page"->"frontpage
<f:cObject typoscriptObjectPath="lib.drilllist" />
when i then run the page i get the "Oops, an error occurred!" i can get
the error fixed if i deselect the template from the MainTemplate
"include Basic Template", so i think its the TS query script thats,
something wrong with.
Can someone help me ?
_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english