查询 #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%'
或等等...
返回不同的结果