[TYPO3] Database relation to a costum table

Jeppe Donslund jd at webmasters.dk
Sun Jun 29 11:35:30 CEST 2008


Hi

I am trying to make a database relation to a costum table, 
static_countries i an extension.

The TCA is like this:

"country" => Array (		
			"exclude" => 1,		
			"label" => 
"LLL:EXT:jd_drinks/locallang_db.xml:tx_jddrinks_drinks.country",		
			"config" => Array (
				"type" => "select",	
				"foreign_table" => "static_countries ",	
				"foreign_table_where" => "ORDER BY static_countries.uid",	
				"size" => 1,	
				"minitems" => 0,
				"maxitems" => 1,
			)
		),

But in the backend I get an MySQL error:

You have an error in your SQL syntax; check the manual that corresponds 
to your MySQL server version for the right syntax to use near 'FROM 
static_countriesxxx , pages WHERE pages.uid=static_countries .pid' at 
line 2 This may indicate a table defined in tables.php is not existing 
in the database!

Why is it comparing pages.uid with static_countries.uid???


Best regards
Jeppe Donslund


More information about the TYPO3-english mailing list