Afficher un message
Vieux 16/03/2008, 21h10   #10
Robert Cummings
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Objects as array key names??


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

  Réponse avec citation
 
Page generated in 0,04402 seconds with 9 queries