MySQL FullText用PDO搜索精确的短语

时间:2015-07-08 15:22:10

标签: php mysql pdo full-text-search prepared-statement

在使用预准备语句时,如何匹配全文搜索中的确切短语?

$stmt = $db->prepare("SELECT (IF(MATCH(title) AGAINST(:search_exact)>0, 10, 0) AS Score FROM table");
$stmt->execute(array("search_exact"=>"the full title"));

该查询将返回标题中包含“完整”或“标题”字样的内容,但如果我想搜索“完整标题”该怎么办?

0 个答案:

没有答案
相关问题