[Typo3-dev] complex database and hook

media.res | alex widschwendter a.widschwendter at mediares.at
Thu Jun 23 12:18:02 CEST 2005


hi,

> Me and my friend are working on our first ext - products database.
> We have about 20 group of products with different parameters so we created 
> one common table  for information like price quantity etc
> Other tables keep information about  parametres for particular group like 
> resolution, weight, taste :).
> We use dynamicConfigFile to load configuration for specific table but I dont 
> know how to solve following problem.
> When I add new record to common table "products" I can select "group" and my 
> form is reloading and additional fileds are available. This additional 
> fields are specific for mentioned groups of products. My form now contains 
> fileds from two tables common and specific. We use hook in our extension to 
> split data from form and save into two tables. That works great.
> Problem is with editing record, because only fields from common table are 
> fill in.
> Do we have to use another hook to get records form specific table or is 
> there any simpler way?
> Any help will be appreciated

have a look at: 
http://typo3.org/documentation/document-library/doc_core_api/columns_fieldnam-5/

foreign_table should help you!

hth alex




More information about the TYPO3-dev mailing list