RE: Generating an automatic e-mail via MySQL

2003-02-12 Thread Andrew Braithwaite
ECTED]] Sent: 12 February 2003 17:43 To: Andrew Braithwaite; Dan Tappin; [EMAIL PROTECTED] Subject: RE: Generating an automatic e-mail via MySQL I am interested as to why no one seems to be using the DBI/DBD-MySQL perl modules? Something like: == #!/usr/bin/perl use str

RE: Generating an automatic e-mail via MySQL

2003-02-12 Thread Karl Dyson
ailbody; print MAIL ".\n"; close MAIL; (obviously you could have used Net::SMTP here, or qmail-inject) $dbh->disconnect; ========== Cheers, Karl -----Original Message- From: Andrew Braithwaite [mailto:[EMAIL PROTECTED]] Sent: 12 February 2003 17:19 To: 'Dan Tappi

RE: Generating an automatic e-mail via MySQL

2003-02-12 Thread Sherzod Ruzmetov
: Does any one have a suggestion on running a daily / weekly e-mail : notification based on results from a MySQL query? In your cron file do something like: echo "select * from table" | mysql [options] db | mail [EMAIL PROTECTED] If it's a more complex query: cat ~/quer

RE: Generating an automatic e-mail via MySQL

2003-02-12 Thread Andrew Braithwaite
I use perl for this. Something like this: -- #!/usr/bin/perl use MIME::Base64; use Mail::Sendmail 0.77; $email = '[EMAIL PROTECTED]'; $subject = 'some stuff here'; $entire_msg = `/usr/local/mysql/bin/mysql -H -e 'some query here' somedatabase`; $ma

Re: Generating an automatic e-mail via MySQL

2003-02-12 Thread andy thomas
On Wed, 12 Feb 2003, Dan Tappin wrote: > Does any one have a suggestion on running a daily / weekly e-mail > notification based on results from a MySQL query? > > I have a table with date sensitive rows. The idea that as rows become > stale (they were created / updated more than a week or month a

Re: Generating an automatic e-mail via MySQL

2003-02-12 Thread David T-G
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan -- ...and then Dan Tappin said... % % Does any one have a suggestion on running a daily / weekly e-mail % notification based on results from a MySQL query? ... % % I have a feeling that I will get a few 'buy a PERL book' suggestions % which is