Received: from LE0-1.webtst1.sprint.ca (LE0-1.webtst1.sprint.ca [207.107.250.51]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eB1CNQF85237; Fri, 1 Dec 2000 07:23:26 -0500 (EST) (envelope-from milesthompson@sprint.ca) Received: from sprint.ca (spc-isp-mtl-uas-37-86.sprint.ca [209.148.165.237]) by LE0-1.webtst1.sprint.ca (8.8.8/8.8.8) with ESMTP id HAA23472; Fri, 1 Dec 2000 07:23:07 -0500 (EST) Message-ID: <3A279816.5DD3262B@sprint.ca> Date: Fri, 01 Dec 2000 08:22:47 -0400 From: Miles Thompson Organization: CQA Consulting Group X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en,pdf MIME-Version: 1.0 To: Jason CC: Bernie Huang , PHP_DB , PHP_General , PGSQL-SQL , PGSQL-GENERAL Subject: Re: Re: [PHP] a script that queries database periodically References: <3A22B485.E8963417@ec.gc.ca> <20001127135438.B27680@jnj.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200012/14 X-Sequence-Number: 1193 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.