Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有其他方法可以在没有 FULLTEXT 的情况下在一列中搜索多个字符串。当我将 MATCH 和 AGAINST 添加到我的 sql 时,我收到此错误“找不到与列列表匹配的 FULLTEXT 索引”下面是我的代码:
$query = "SELECT id, title, introtext, published FROMjos_k2_itemsWHERE MATCH(title,introtext) AGAINST('".$search."') LIMIT 30";
$query = "SELECT id, title, introtext, published FROM
WHERE MATCH(title,introtext) AGAINST('".$search."') LIMIT 30";
要么在这两个字段上添加全文索引,要么进行大量的预处理/动态查询构建:
... WHERE title LIKE '%word1%' OR title LIKE '%word2' OR title LIKE ... OR introtext LIKE '%word1%' OR introtext LIKE '%word2%' ...