What is the most efficient way to store SELECT results
What is the most efficient way to store SELECT results
am 09.10.2007 05:25:21 von Robert Palmer
I want to store the results of a SELECT query in order to be able to
page through those results and allow the user to select one, see it in
more details and then return to the original list of results. What's the
usual technique for doing this?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: What is the most efficient way to store SELECT results
am 09.10.2007 08:18:17 von Ben
Robert wrote:
> I want to store the results of a SELECT query in order to be able to
> page through those results and allow the user to select one, see it in
> more details and then return to the original list of results. What's
> the usual technique for doing this?
>
place a get variable after the query as it is listed in some table in
html, then the link for the entry will be identifying the data such that
a second handler page or second query can funish the additional data ;-)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: What is the most efficient way to store SELECT results
am 09.10.2007 13:47:11 von Robert Palmer
I'm not I was clear in my question. A query returns 1,000 rows from the
table. I want to store the entire result of that query in order to be
able to create separate pages to return the results rather than all on
one page "e.g. Page 1 2 3 4 ... ". Not sure if it's important but I'm
using persistent connections.
ben@avmedia-consulting.com wrote:
> Robert wrote:
>> I want to store the results of a SELECT query in order to be able to
>> page through those results and allow the user to select one, see it
>> in more details and then return to the original list of results.
>> What's the usual technique for doing this?
>>
> place a get variable after the query as it is listed in some table in
> html, then the link for the entry will be identifying the data such
> that a second handler page or second query can funish the additional
> data ;-)
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: What is the most efficient way to store SELECT results
am 09.10.2007 16:38:08 von Roberto Mansfield
Many sites just requery the database on each page and just return the
relevant results. If you are using mysql, you can use LIMIT in your
query to restrict the results for a specific "page". You can also do
something in similar in Oracle using nested queries and row ids.
If the query is slow, you could cache the results in a temporary table
keyed on the user's session id.
-Roberto
Robert Palmer wrote:
> I'm not I was clear in my question. A query returns 1,000 rows from the
> table. I want to store the entire result of that query in order to be
> able to create separate pages to return the results rather than all on
> one page "e.g. Page 1 2 3 4 ... ". Not sure if it's important but I'm
> using persistent connections.
>
> ben@avmedia-consulting.com wrote:
>> Robert wrote:
>>> I want to store the results of a SELECT query in order to be able to
>>> page through those results and allow the user to select one, see it
>>> in more details and then return to the original list of results.
>>> What's the usual technique for doing this?
>>>
>> place a get variable after the query as it is listed in some table in
>> html, then the link for the entry will be identifying the data such
>> that a second handler page or second query can funish the additional
>> data ;-)
>>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Autorunning a file
am 10.10.2007 05:34:17 von Alexander
Is there anyway to auto execute a PHP file? I'm working on a script that
tracks activity and IPs of visitors, and then at a certain time daily emails
me the results.
Any idea of a way to do this?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Autorunning a file
am 10.10.2007 05:58:14 von dmagick
Alexander wrote:
> Is there anyway to auto execute a PHP file? I'm working on a script that
> tracks activity and IPs of visitors, and then at a certain time daily
> emails me the results.
>
> Any idea of a way to do this?
Use cron if you're on a linux/bsd based system or scheduled tasks if
you're on windows.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Autorunning a file
am 10.10.2007 06:36:49 von Dustin Simpson
Alexander,
Assuming you are on a *nix machine and php is installed in
/usr/local you could schedule a cron job with the command:
/usr/local/bin/php phpfile.php
where phpfile.php is the file you want to execute.
Hope this helps.
Thanks,
--Dustin
Alexander wrote:
> Is there anyway to auto execute a PHP file? I'm working on a script
> that tracks activity and IPs of visitors, and then at a certain time
> daily emails me the results.
>
> Any idea of a way to do this?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Autorunning a file
am 10.10.2007 14:10:50 von Lasitha Alawatta
If u don't have permission to ur command line;
Try to solve ur t=
hing by using
=0A01) Meta refresh
=09OR
02) JavaScript=
- setTimeout() function.
Regards,
Lasitha
=
=0A-----Original Message-----
From: Alexander [mailto:kurokawa@t=
ds.net]
=0ASent: Wednesday, October 10, 2007 7:34 AM
To: php-db@l=
ists.php.net
Subject: [PHP-DB] Autorunning a file
Is there =
anyway to auto execute a PHP file=3F I'm working on a script that
=
tracks activity and IPs of visitors, and then at a certain time daily
=
emails
=0Ame the results.
Any idea of a way to do this=3F =0D=
=0A--
=0APHP Database Mailing List (http://www.php.net/)
To=
unsubscribe, visit: http://www.php.net/unsub.php
DOTW DIS=
CLAIMER:
This e-mail and any attachments are strictly confidenti=
al and intended for the addressee only. If you are not the named addressee =
you must not disclose, copy or take
any action in reliance of this tra=
nsmission and you should notify us as soon as possible. If you have receive=
d it in error, please contact the message sender immediately.
This e-m=
ail and any attachments are believed to be free from viruses but it is your=
responsibility to carry out all necessary virus checks and DOTW accepts no=
liability
in connection therewith.
=0AThis e-mail and all =
other electronic (including voice) communications from the sender's company=
are for informational purposes only. No such communication is intended=0D=
=0Aby the sender to constitute either an electronic record or an electronic=
signature or to constitute any agreement by the sender to conduct a transa=
ction by electronic means.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Autorunning a file
am 11.10.2007 02:42:08 von Alexander
Thanks for the replies. I'm going to have to check what the server is, I'm
not the one with the hosting account, so no direct access to the server
(yet, will probably get it when I need to).
The only problem I see with thise solution here is that the page that the
script will be in won't be directly accessed, which is a requirement for
JavaScript. I plan to keep this as a hidden file, so the visitors aren't
aware of its existence. I thought of creating a script on the index that
checks the time and if it's a certain time runs the script for this, but
then I realized that there may not be a visitor calling the index at the
time I need it.
I'll look into the cron job.
Thanks again,
Alexander
----- Original Message -----
From: "Lasitha Alawatta"
To: "Alexander" ;
Sent: Wednesday, October 10, 2007 7:10 AM
Subject: RE: [PHP-DB] Autorunning a file
If u don't have permission to ur command line;
Try to solve ur thing by using
01) Meta refresh
OR
02) JavaScript - setTimeout() function.
Regards,
Lasitha
-----Original Message-----
From: Alexander [mailto:kurokawa@tds.net]
Sent: Wednesday, October 10, 2007 7:34 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Autorunning a file
Is there anyway to auto execute a PHP file? I'm working on a script that
tracks activity and IPs of visitors, and then at a certain time daily
emails
me the results.
Any idea of a way to do this?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
DOTW DISCLAIMER:
This e-mail and any attachments are strictly confidential and intended for
the addressee only. If you are not the named addressee you must not
disclose, copy or take
any action in reliance of this transmission and you should notify us as soon
as possible. If you have received it in error, please contact the message
sender immediately.
This e-mail and any attachments are believed to be free from viruses but it
is your responsibility to carry out all necessary virus checks and DOTW
accepts no liability
in connection therewith.
This e-mail and all other electronic (including voice) communications from
the sender's company are for informational purposes only. No such
communication is intended
by the sender to constitute either an electronic record or an electronic
signature or to constitute any agreement by the sender to conduct a
transaction by electronic means.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: What is the most efficient way to store SELECT results
am 13.10.2007 02:21:04 von leo.divinagraciaiii
Robert Palmer wrote:
> I'm not I was clear in my question. A query returns 1,000 rows from the
> table. I want to store the entire result of that query in order to be
> able to create separate pages to return the results rather than all on
> one page "e.g. Page 1 2 3 4 ... ". Not sure if it's important but I'm
> using persistent connections.
>
test out your server.
create a test script to load the results into an array.
keep track of memory usage. then calculate that to how much traffic
that script will be seeing.
so taking that into consideration, if you run separate boxes for your
web server/php and db, you can balance out: lots of hits on memory on
the web server or lots of disc access on the db server if you decide to
go with the "re-call the db server" paging methods...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php