使用WHERE MATCH在两列或多列中查找完全匹配时遇到一些困难。在我尝试的脚本下面:
SELECT * FROM people WHERE MATCH (_fristname) AGAINST ('$search') LIMIT 0, 2;
上面的代码工作正常,
SELECT * FROM people WHERE MATCH (_lastname) AGAINST ('$search') LIMIT 0, 2;
上面的代码也有效,
SELECT * FROM people WHERE MATCH (_firstname, _lastname) AGAINST ('$search') LIMIT 0, 2;
上面的代码不起作用。我想在两列中搜索完全匹配
以下代码是我以前用PHP输出的代码:
$searched = mysqli_query($connect, $sql);
while($info = mysqli_fetch_array($searched)) {
echo $info['_jobdescription'];
}