Re: [PHP] object persistence within a session

2008-11-10 Thread ceo
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

Re: [PHP] object persistence within a session

2008-11-10 Thread Andrew Ballard
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

Re: [PHP] object persistence within a session

2008-11-10 Thread Eric Butera
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

Re: [PHP] object persistence within a session

2008-11-10 Thread ceo
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

RE: [PHP] object persistence within a session

2008-11-10 Thread Boyd, Todd M.
-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

Re: [PHP] object persistence within a session

2008-11-10 Thread Ashley Sheridan
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

Re: [PHP] object persistence within a session

2008-11-10 Thread ceo
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

Re: [PHP] object persistence within a session

2008-11-10 Thread Ashley Sheridan
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

Re: [PHP] object persistence within a session

2008-11-10 Thread Andrew Ballard
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,

Re: [PHP] object persistence within a session

2008-11-07 Thread uaca man
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

Re: [PHP] object persistence within a session

2008-11-07 Thread Andrew Ballard
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.

Re: [PHP] object persistence within a session

2008-11-07 Thread Eric Butera
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.

[PHP] object persistence within a session

2008-11-07 Thread Stan
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

Re: [PHP] object persistence within a session

2008-11-07 Thread Jochem Maas
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

Re: [PHP] object persistence within a session

2008-11-07 Thread Stan
Andrew, Do I feel stupid! Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] object persistence within a session is resolved

2008-11-07 Thread Stan
Thank you all for your assistance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] object persistence within a session

2008-11-07 Thread Stan
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

Re: [PHP] object persistence within a session

2008-11-07 Thread tedd
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

Re: [PHP] object persistence within a session

2008-11-07 Thread Shawn McKenzie
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

Re: [PHP] object persistence within a session

2008-11-07 Thread Andrew Ballard
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