in reply to Perl and MySQL - performing a search...
You can also use several special characters/constructs to limit the matches. See the MySQL docs for more info.sub detect_profanity { my $str = shift; my $sth = $dbh->prepare (qq{ SELECT * FROM `forbidden_usernames` W +HERE `f_user` REGEXP ? }); $sth->execute($str); my $row = $sth->fetchrow_hashref(); $sth->finish(); return "bad" if $row; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl and MySQL - performing a search...
by powerhouse (Friar) on Jan 27, 2003 at 05:35 UTC |