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.
--
PHP
On Mon, Nov 10, 2008 at 8:55 AM, [EMAIL PROTECTED] 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
On Mon, Nov 10, 2008 at 8:55 AM, [EMAIL PROTECTED] 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
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
-Original Message-
From: Andrew Ballard [mailto:[EMAIL PROTECTED]
Sent: Monday, November 10, 2008 8:04 AM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] object persistence within a session
On Mon, Nov 10, 2008 at 8:55 AM, [EMAIL PROTECTED] wrote:
I've
On Mon, 2008-11-10 at 14:29 +, [EMAIL PROTECTED] wrote:
And there are times when the JOINs for the one-query solution will
kill you anyway, but with proper pagination, the dozen multi-query
solution will zip along merrily.
But joins are what relation databases excel at, so PHP would be the
But joins are what relation databases excel at, so PHP would be the
bottleneck in your example.
Not always...
If your JOIN can not be easily constrained in the query, until some kind of
processing of the result set takes place, you can end up with a monster interim
result set that
On Mon, 2008-11-10 at 14:47 +, [EMAIL PROTECTED] wrote:
But joins are what relation databases excel at, so PHP would be the
bottleneck in your example.
Not always...
If your JOIN can not be easily constrained in the query, until some kind of
processing of the result set
On Mon, Nov 10, 2008 at 9:47 AM, [EMAIL PROTECTED] wrote:
But joins are what relation databases excel at, so PHP would be the
bottleneck in your example.
Not always...
If your JOIN can not be easily constrained in the query, until some kind of
processing of the result set takes place,
Did storing the object reference not also store the class definition?
No. You need to include the class definition. Take a look at:
http://br.php.net/manual/en/function.unserialize.php, maybe you can use the
*unserialize_callback_func *to load the class definition.
Ângelo
2008/11/7 Stan
On Fri, Nov 7, 2008 at 8:33 AM, Stan [EMAIL PROTECTED] wrote:
If this is the wrong forum, please point me at the correct forum.
I am new to PHP but have 40 years experience programming.
My initial effort includes a class definition which needs to persist for the
duration of a WWW session.
On Fri, Nov 7, 2008 at 8:33 AM, Stan [EMAIL PROTECTED] wrote:
If this is the wrong forum, please point me at the correct forum.
I am new to PHP but have 40 years experience programming.
My initial effort includes a class definition which needs to persist for the
duration of a WWW session.
If this is the wrong forum, please point me at the correct forum.
I am new to PHP but have 40 years experience programming.
My initial effort includes a class definition which needs to persist for the
duration of a WWW session. The code (this snippet is the beginning of
Default.php)
?PHP
Stan schreef:
If this is the wrong forum, please point me at the correct forum.
I am new to PHP but have 40 years experience programming.
cool. we're you around when they programmed with Rocks[tm]? :-)
(stick around a while and you'll get to know that inside joke)
My initial effort includes
Andrew,
Do I feel stupid!
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thank you all for your assistance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jochem,
So ... what I did was to experiment with the idea of creating a database
schema that would allow me to define a web page. One row, one web page.
Contained navigation information (bar left, right, bottom, top, none),
title, pointer to the file containing the HTML document for the main
At 7:08 PM +0100 11/7/08, Jochem Maas wrote:
Stan schreef:
If this is the wrong forum, please point me at the correct forum.
I am new to PHP but have 40 years experience programming.
cool. we're you around when they programmed with Rocks[tm]? :-)
(stick around a while and you'll get to
tedd wrote:
At 7:08 PM +0100 11/7/08, Jochem Maas wrote:
Stan schreef:
If this is the wrong forum, please point me at the correct forum.
I am new to PHP but have 40 years experience programming.
cool. we're you around when they programmed with Rocks[tm]? :-)
(stick around a while and
On Fri, Nov 7, 2008 at 3:54 PM, Stan [EMAIL PROTECTED] wrote:
Andrew,
Do I feel stupid!
Thanks.
Welcome to the list. No need to feel stupid, and you're welcome. We
were all here at some point. Even tedd, who has been programming since
Rocks apparently. :-) At least you read up on the language
20 matches
Mail list logo