MySQL match()with()用于多个关键字的比较

时间:2015-05-16 14:05:41

标签: php mysql compare match against

MySQL match()针对()多个关键字进行比较

这是我的疑问:

for (int i = 0; i < MyGameObjects.Count; ++i) {
    if (MyGameObjects[i].GetType() == typeof(DrawableGameObject)) {
        // use Animation property of MyGameObjects[i] here...
    }
}

我的数据库看起来像那样:

   SELECT *
    FROM table
    WHERE MATCH(column) AGAINST('word')
    ORDER BY MATCH(column) AGAINST('word') DESC
    LIMIT 50;

我需要的是将标题与最相关的标题进行比较,并更新列&#39; related_ids&#39;有ids

结果应该是:

id | title | relevant_ids
1 | title1 | null
2 | title2 | null
3 | title3 | null
4 | title4 | null
5 | title5 | null
6 | title6 | null
  • 表示title1与title6,title2和title3
  • 相关
  • 我的表格包含超过100K的行是获得前50个相关标题的最快方式吗?

感谢

0 个答案:

没有答案