Re: Re: [PHP] a script that queries database periodically

From: Miles Thompson <milesthompson(at)sprint(dot)ca>
To: Jason <jason(at)jnj(dot)org>
Cc: Bernie Huang <bernie(dot)huang(at)ec(dot)gc(dot)ca>, PHP_DB <php-db(at)lists(dot)php(dot)net>, PHP_General <php-general(at)lists(dot)php(dot)net>, PGSQL-SQL <pgsql-sql(at)postgresql(dot)org>, PGSQL-GENERAL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: [PHP] a script that queries database periodically
Date: 2000-12-01 12:22:47
Message-ID: 3A279816.5DD3262B@sprint.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql


Jason's definitiely on the right track.

I'd add that if you don'tknow Perl, Python might be easier. Check
http://sourceforge.net/forum/forum.php?forum_id=39069, starship.net might also
have a PostreSQL module.

Python also has a very easy to use SMTP module for mailing of reports.

There's nothing anti-Perl here, I just don't know that language and found
Python quite natural.

Miles Thompson

RE
Jason wrote:

> > I was thinking of writing up a PHP script and put into crontab, which is
> > somehow easier than a shell script, but PHP is an apache module, so I
> > cannot execute PHP under crontab (it has to be executed in a browser
> > right?). I guess a shell script is necessary. So, is it possible to
> > call 'psql' and returning its query result and I can use sendmail to
> > email the result? Any other idea?
>
> if you know perl, you should check out DBI. Read all about it at
> www.cpan.org. It's pretty similar to the php database interface.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Gould 2000-12-01 12:52:31 server permissions for sql copy
Previous Message Jarmo Paavilainen 2000-12-01 12:04:29 SV: Unanswered questions about Postgre

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-12-01 15:21:44 Re: arhiving rule
Previous Message A. Van Hook 2000-12-01 11:44:29 arhiving rule