0

查询 #1:


SELECT DISTINCT `title`
FROM `table`
WHERE (
`title` LIKE '%this is search%'
)
OR (
`title` LIKE '%this%'
AND `title` LIKE '%is%'
AND `title` LIKE '%search%'
)
OR (
`title` LIKE '%this%'
OR `title` LIKE '%is%'
OR `title` LIKE '%search%'
)
LIMIT 0 , 10

但效果不佳,当我尝试拆分此 sql 时:

查询 #2:


SELECT DISTINCT `title`
    FROM `table`
    WHERE (
    `title
` LIKE '%this is search%'
    )

或者

查询 #3:


SELECT DISTINCT `title`
    FROM `table`
    WHERE (
`title` LIKE '%this%'
    AND `title` LIKE '%is%'
    AND `title` LIKE '%search%'

等等...

返回不同的结果

4

1 回答 1

4

您提供的信息太少,但据我所知,您正在寻找 mySQL 的全文搜索功能。

于 2010-03-04T23:11:21.607 回答