[TYPO3-dev] TCA and own tables

Christian Leicht usenet at schani.com
Fri Apr 18 18:52:29 CEST 2008


Malte Jansen schrieb:
> 
>>
>> Hello again,
>>
>> now i implemented the database in Typo3. Now i use the foreign_table 
>> reference list me the table entrys in the BE :-)))
>> If i select some of this entrys, it will not store the values of the 
>> listing. It stores the uid of the reference databes.
>> Is it posible to store another field in the "master" table?
>>
>> Christian
> 
> Hi,
> 
> there two ways of storing a foreign key:
> 
> 1. Storing one ore more UID(s) in the field
> 2. Storing the a counter in the field and have two additional fields in 
> the foreign table: foreign_table, foreign_uid
> 
> Is there a reason for not using the uid? The get a record by the uid is 
> much faster than by any other field (expected you make some more 
> db-configuration).
> I think the UID is hardcoded, so you have to use one of the possibility 
> above.
> Check out the doc_core_api for details (keyword: TCA).
> 
> Cheers,
> 
> Malte

The reason why i ask about it is...

I like to have a option list in BE with 2 fields in it.

Like

01067 Dresden
45555 Frankfurt
20345 Hamburg
...

The Option list should have then
<option value="01067">01067 Dresden</option>

But of course its also possible to use  
<option value="uid#">01067 Dresden</option>

But is there a chance to get the 2nd field in it?

Christian











More information about the TYPO3-dev mailing list