[TYPO3-english] MySQL query error

Thomas Petersen tp at codem.dk
Thu Sep 26 12:10:25 CEST 2013


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 ?


More information about the TYPO3-english mailing list