[TYPO3-dev] The concept behind the model-array?

Walter Seeberger walk2moon at gmx.de
Fri Jul 31 09:19:04 CEST 2009


Hello Franz,

thank your for your answer. Sorry, but I don't understand really how to benefit from that array. Perhaps I have to explain what I am trying to do.

I have a input field in my template. Now I want to query the database with the input value of that field, so I am going to have controller action, which is fired by the form. Ok.

But how can I access the input value from my model, so I can query my db according to the given value? I can't see how to manage the chain...
So I hope you don't mind, I ask that stupid questions :-)

Regards,
Walter

-------- Original-Nachricht --------
> Datum: Thu, 30 Jul 2009 01:49:46 +0200
> Von: Franz Koch <typo.removeformessage at fx-graefix.de>
> An: typo3-dev at lists.netfielders.de
> Betreff: Re: [TYPO3-dev] The concept behind the model-array?

> Hi,
> 
> > $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $tables,
> $where, $groupBy, $orderBy);
> >                 if($result) {
> >                         while($row =
> $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
> >                                 $entry = new tx_lib_object($row);
> >                                 $this->append($entry);
> >                         }
> >                 }
> 
> where's the problem? You could:
> 
> a) iterate the internal array again and do other queries for each record 
> (and merge their results with the object)
> b) cache your objects in a temporary array, do further processing with 
> it, and when you're finished append the final objects to the internal 
> object array
> c) same as b), but keep your results as arrays for further manipulation 
> and create the objects and append them after you finished all your other 
> processing
> 
> 
> you don't have to create and append the objects already in the first 
> stage of your processing.
> 
> -- 
> kind regards,
> Franz Koch
> 
> ---------------------------------------------------
> PayPal-Account: 'paypal _at_ elements-net _dot_ de'
> ---------------------------------------------------
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser




More information about the TYPO3-dev mailing list