"IN BOOLEAN MODE" should definitely not be in there. Those are keywords. The replaceable parameters can *only* replace literals (and then, only some litarals). If anything works, it's
my $table_lit = $dbh->quote_identifier( $table ); my $stmt = qq{ SELECT * FROM $table_lit WHERE ( MATCH( Author ) AGAINST( ? IN BOOLEAN MODE ) ) ORDER BY Title }; ... $sth->execute('+herman +melville');
If the above doesn't work, the following will definitely work:
my $table_lit = $dbh->quote_identifier( $table ); my $pattern_lit = $dbh->quote( '+herman +melville' ); my $stmt = qq{ SELECT * FROM $table_lit WHERE ( MATCH( Author ) AGAINST( $pattern_lit IN BOOLEAN MODE ) ) ORDER BY Title }; ... $sth->execute();
Update: Added backup method.
In reply to Re: DBI/DBD::mysql placeholders and full text searches
by ikegami
in thread DBI:MYSQL placeholders and full text searches
by Gnat53
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |