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

Franz Koch typo.removeformessage at fx-graefix.de
Thu Jul 30 01:49:46 CEST 2009


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'
---------------------------------------------------




More information about the TYPO3-dev mailing list