[EMAIL PROTECTED] wrote:
Hi.
Hello,
Solved after I posted.
Surround $email with 's.
As in '$email'.
Close, but this is a gun pointed at your head :)
You either need to $dbh->quote() it or do the bind value/placeholder
(see `perldoc DBI` for details of both)
: Dienstag, 31. Januar 2006 04:23
An: dbi-users@perl.org
Betreff: searching database on emailaddress field
Hi.
I'm trying to work out how to search a database by emailaddress.
I'd like to see if an emailaddress exists in a database already.
The code looks like this:
/~
On Tue, 31 Jan 2006 14:24:44 +1030, [EMAIL PROTECTED] wrote:
Hi Luke
> Solved after I posted.
> Surround $email with 's.
> As in '$email'.
Nice try, but no cigar. See below.
>> my $sth = $dbh->prepare("select id, address from subs_email where
>> address=".$email); $sth->execute(); my @array = $
Hi.
Solved after I posted.
Surround $email with 's.
As in '$email'.
Thanks.
Kr.
Luke.
31Jan2006 @ 13:52 [EMAIL PROTECTED] thusly spake
> Hi.
>
> I'm trying to work out how to search a database by emailaddress.
> I'd like to see if an emailaddress exists in a database already.
>
> The code look
Hi.
I'm trying to work out how to search a database by emailaddress.
I'd like to see if an emailaddress exists in a database already.
The code looks like this:
/~~~
my $email = '[EMAIL PROTECTED]';
my $sth = $dbh->prepare("select id, address from subs_email where
address