[Mimedefang] perl problem
Mark
admin at asarian-host.net
Thu Nov 10 08:03:18 EST 2005
> -----Original Message-----
> From: mimedefang-bounces at lists.roaringpenguin.com
> [mailto:mimedefang-bounces at lists.roaringpenguin.com] On Behalf Of Mack
> Sent: donderdag 10 november 2005 13:59
> To: mimedefang at lists.roaringpenguin.com
> Subject: RE: [Mimedefang] perl problem
>
>
> my $newrecip =$recip;
> $newrecip =~ s/'/''/gi;
> $sth1 = $dbh->prepare("SELECT value FROM userpref WHERE username =
> '$recip' && preference='whitelist_from'");
>
> that will fix it, (replacing the ' with '') be carefull of \'
> as well if you are using mysql
My method is better, really. :)
$sth1 = $dbh->prepare("SELECT value FROM userpref WHERE username = ? &&
preference='whitelist_from'");
$sth1 -> execute ($recip).
It lets DBI do the quotemeta thingy, internally, and is really the best way
to pass parameters to an execute call.
But all of this is hopelessly OT, of course.
- Mark
More information about the MIMEDefang
mailing list