in reply to DBI Placeholders and REGEXP
Here's how it would look in perl, somewhat:
... in my experience, and as dws says, these regexps most likely will -not- be handled by MySQL. I tried a similar snippet using a regexp the MySQL understands, and it worked as expected. The concept of putting your RE into a string and then using that in $sth->execute() is valid.my $sth=$dbh->prepare('SELECT * FROM foo WHERE something REGEXP ? ORDE +R BY fate;'); my $re='(^|\;)' . $input . '(\;|$)'; $sth->execute($re);
--
Me spell chucker work grate. Need grandma chicken.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: DBI Placeholders and REGEXP
by Masem (Monsignor) on Feb 15, 2001 at 09:39 UTC |