On Sun, 2008-03-16 at 11:42 -0700, Jim Lucas wrote: > Robert Cummings wrote: > > Imagine 200 customers in your example... your example will hit the DB > > 201 times. The above hits the DB twice. > > My code was intended to get the concept across. Thanks for the > suggestions though. Ah, ok. I've inherited projects in the past where the kind of code you showed was defacto... except the number of queries made to render a homepage wasn't 201 it was thousands. In one case someone built a category pullout menu that was generating close to 18000 queries. That holds my record for inefficient DB queries. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php