Hi,
i know this is not a direct EmbPerl question, but most of you
fellow EmbPerl guys probably use DBI for database connectivity
and might have an idea, is there a "cleaner" solution to do
this thing:
--- 8< ---
$keyword=$dbh->quote($fdat{what});
$keyword=~s/^\'//;
$keyword=~s/\'$//;
$sth=$dbh->prepare("SELECT ... FROM TABLE WHERE field like '%$keyword%'");
--- 8< ---
Rgds,
Tfr
--==< tfr@cafe.ee >==< http://tfr.cafe.ee/ >==< +1-504-4467425 >==--
i know this is not a direct EmbPerl question, but most of you
fellow EmbPerl guys probably use DBI for database connectivity
and might have an idea, is there a "cleaner" solution to do
this thing:
--- 8< ---
$keyword=$dbh->quote($fdat{what});
$keyword=~s/^\'//;
$keyword=~s/\'$//;
$sth=$dbh->prepare("SELECT ... FROM TABLE WHERE field like '%$keyword%'");
--- 8< ---
Rgds,
Tfr
--==< tfr@cafe.ee >==< http://tfr.cafe.ee/ >==< +1-504-4467425 >==--