Re: object persistence within a session

From: Date: Mon, 10 Nov 2008 14:04:12 +0000
Subject: Re: object persistence within a session
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-283174@lists.php.net to get a copy of this message
On Mon, Nov 10, 2008 at 8:55 AM, <ceo@l-i-e.com> wrote: > >> I've found that I don't mind a few well organized database calls per >> page for the information I need. > > Opening up a database connection is very expensive. > > Sending one more simple / fast query is dirt cheap. > > Time it on your system with http://php.net/microtime and see. > > Perhaps, but the examples I usually find when cleaning up code are of the variety where a script executes one statement to find a list of parent records, iterates through those records and inside the loop it executes another statement (sometimes multiple statements!) to get the details, update records, etc. Andrew

« previous php.general (#283174) next »