如何根据后缀搜索数据?

时间:2015-10-13 07:14:15

标签: mysql search full-text-search

我有一张这样的表:

Hard Out Of Memory Error. Bucket "test2" on node 100.66.32.169 is full. All memory allocated to this bucket is used for metadata.

其实我想要这个输出:

// mytable
+----+-----------+
| id |   title   |
+----+-----------+
| 1  | greating  |
| 2  | colors    |
| 3  | dislike   |
+----+-----------+

这是我的查询:(但不起作用)

'color'  =>  nothing found
'colors' =>  second row selected
'great'  =>  nothing found
'like'   =>  third row selected

那么,我该如何实现呢?

  • 应该注意这是有效的:(perfix)

    SELECT * FROM mytable WHERE MATCH(content) AGAINST(*$anything IN BOOLEAN MODE)

但正如我所说,我需要后缀(不是背景)

  • 应该注意,我可以使用... $anything* IN BOOLEAN MODE caluse来做到这一点,如下所示:

    LIKE

但我希望使用... WHERE title LIKE %$anything

0 个答案:

没有答案