クエリ #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%'
またはなど...
異なる結果を返す