Reputation: 4161
Is there any way of using match against statement in Propel (ORM)? It is odd I cannot find anything related to this.
Upvotes: 2
Views: 709
Reputation: 175
At least in Propel 1.7 it works with a where() clause:
UserQuery::create()->where('MATCH('
. UserPeer::Name
. ') AGAINST(?)', $name)->find();
Upvotes: 1
Reputation: 823
No direct support. Perhaps a custom query?
$con = Propel::getConnection(BookPeer::DATABASE_NAME);
$sql = "SELECT title,category FROM articles WHERE MATCH(title,category) AGAINST (:text);
$stmt = $con->prepare($sql);
$stmt->execute(array(':text' => 'My match text'));
Upvotes: 1