我是个新手,无法让这个查询返回任何结果。如何将AND paginas_taal = 'ned'
添加到下面的查询中
有人知道线索吗?
SELECT *
FROM (
SELECT paginas_tekst AS Tekst, paginas_naam AS Naam, paginas_button AS Button, 'paginas' AS Tabel, '0' AS Parent,
MATCH (
paginas_tekst
)
AGAINST (
'shoppers'
) AS Relevance
FROM paginas
WHERE MATCH (
paginas_tekst
)
AGAINST (
'+shoppers'
IN BOOLEAN
MODE
)
HAVING Relevance > 0.2
) AS testtabel
ORDER BY Relevance DESC
LIMIT 0, 30
TIAGr.Hans
您可以在WHERE子句的任何位置添加一个额外的AND子句。还要注意,你不需要外部查询,所以你应该能够编写
SELECT paginas_tekst AS Tekst, paginas_naam AS Naam, paginas_button AS Button,
'paginas' AS Tabel, '0' AS Parent,
MATCH ( paginas_tekst ) AGAINST ( 'shoppers' ) AS Relevance
FROM paginas
WHERE MATCH ( paginas_tekst ) AGAINST ( '+shoppers' IN BOOLEAN MODE )
AND paginas_taal = 'ned'
HAVING Relevance > 0.2
ORDER BY Relevance DESC
LIMIT 0, 30