Re: Efficiency of DDD programing

From: Date: Sun, 20 Nov 2011 20:15:39 +0000
Subject: Re: Efficiency of DDD programing
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-48098@lists.php.net to get a copy of this message
foreach ($articles as $author => $article) { echo("author".$i." =".$author."<br>article=".$article); } I think. I could be corrected. Not to mention, did you mean to spell your function like this? getAutor? Or did you mean getAuthor? HTH, Best, Karl Sent from losPhone On Nov 20, 2011, at 8:24 AM, "Fanda" <dev@sidak.net> wrote: > Hi, > how to solve this problem: > > If I write a repository for each entity, article and autor for example, article is composed of > autor and some other things, then I want to select some articles: > > $articles = $articleRepo->findLast(10); > foreach ($articles as $article) { > // echo article content > ... > // echo > $article->getAutor(); // next query into database, in each cycle > } > > Is some elegant way, how to do this (optimise)? > > Thank you. > F. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#48098) next »