Thanks, I'll have a look at this also. Is this the recommended way then for
what I am doing with the data.?
Gav...
| Also, I would recommend you consider using placeholders for all values
| passed to your prepare statement.
|
| eg. my $sth = $dbh->prepare('SELECT email_address FROM users WHER
| If you were using the recommended pragma
| use warnings;
| at the beginning of the script (or running "perl -w"), you would have
| found earlier that @myisp was being misinterpreted, with a warning
| message like this:
| Possible unintended interpolation of @myisp in string at ...
| Name "m
Also, I would recommend you consider using placeholders for all values
passed to your prepare statement.
eg. my $sth = $dbh->prepare('SELECT email_address FROM users WHERE
email_address = ?') || die $dbh->errstr();
$sth->execute($email) || die $dbh->errstr();
but looking at your query
Also, I would recommend you consider using placeholders for all values
passed to your prepare statement.
eg. my $sth = $dbh->prepare('SELECT email_address FROM users WHERE
email_address = ?') || die $dbh->errstr();
$sth->execute($email) || die $dbh->errstr();
but looking at your query I
>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 @ !!
If you were using the recommended pragma
use warnings;
at the beginning of the script (or runnin
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 ou
On 03/24/2005 05:31 PM, Gav said:
Can someone point me as to what is wrong with this :-
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard);
use DBI;
$|=1;
open(MESS
Hi All,
Finally, a newsgroup where I haven't got a clue (most of the time) what you
lot are talking about!
Anyway, above statement proving my newbie status so I need help with :
Retrieve email addresses from 'email_address' field in 'users' database.
Send out email from email.txt file to all th