我是新手,我无法获得此查询返回任何结果。
如何在下面的查询中添加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
TIA 克。汉斯
答案 0 :(得分:0)
您可以在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