----- Original Message -----
From: "Jochem Maas" <jochem@xxxxxxxxxxxxx>
To: "C.R.Vegelin" <cr.vegelin@xxxxxxxxx>
Cc: "David Giragosian" <dgiragosian@xxxxxxxxx>; "php-general"
<php-general@xxxxxxxxxxxxx>
Sent: Friday, November 02, 2007 10:41 AM
Subject: Re: Transfer query result to another script
C.R.Vegelin wrote:
...
Hi Jochem,
The reason for a redirect is that Report.php has functionality such as
sorting on report columns, checkboxes to make graphs etc.
Suppose the following report columns:
Country 06.Q1 06.Q2 06.Q3 06.Q4 07.Q1 07.Q2
1 Austria 1226 1211 1233 1328 1386 1362
2 Belgium 1004 1193 1008 9737 1102 1270
3 etc.
If I don't use a redirect but an include Report.php then Engine.php must
be rerun:
- every time a user wants to sort on a columns, eg. Y06.Q1
- every time a user wants to make a graph with selected rows.
Right ? I did use an include but I'm changing it because of the reasons
above.
using a redirect doesn't solve the 'problem' - what does Engine.php doe
exactly? how long does it take? your going to have think about caching the
dataset generated by Engine in some way ... and sticking a MySQL resultset
resource id in $_SESSION is not going to work.
also does calling the script 'Report.php' mean you no longer have
to refresh the page if you want to use different parameters? or do you
still
have to do a page refresh??
I know it does have its price.
Regards, Cor
Hi Jochem,
Engine.php does the following:
a. checking validity of form query fields
b. sending messages if invalid form query fields
c. building the sql and executing it
d. new: building $_SESSION['data'] for Report.php
e. include / redirect for different output formats
Step d. now passes the result set to Report.php.
So Engine.php now redirects to Report.php once per query,
and when the user changes report settings, Report.php is called by itself
with required settings.
More or less comparable to
http://www.tonymarston.net/sample/person_list.php,
except that my application is read-only and provided with graphs.
I have to admit that I haven't tested the time needed for steps a-c.
So I may save some time at the cost of extra mem to pass SESSION['data'].
On the other hand, by splitting Engine and Report code I may save some mem,
I think.
Thanks for your time, Jochem.
Regards, Cor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php