Thanks Michael,

I have taken on board and implemented your changes re:error checking etc.

Actually, my code did work apart from this one line :-

my $sth = $dbh->prepare("SELECT email_address FROM users")

The above is what I quoted you, which now works, but for testing I did not 
want to send out to all users so amended it to

my $sth = $dbh->prepare("SELECT email_address FROM users WHERE 
email_address='[EMAIL PROTECTED]'")

The above line did not work, so the address was not found, guess who forgot 
to escape the @ !!

my $sth = $dbh->prepare("SELECT email_address FROM users WHERE 
email_address='[EMAIL PROTECTED]'")

Now this worked fine, so did the rest of the script. Error checking did not 
help in this case though, it simply could not
find it in the database beacuse it wasnt sending the full email address to 
look for without the \.

Thanks for your help

Gav... 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.1 - Release Date: 23/03/2005

Reply via email to