您好'我试图从已加入的列中进行选择:
SELECT
A.idAd,
A.ads_in_Cat,
A.title,
A.currency,
A.price,
A.in_dpt,
A.description,
D.*,
S.*
FROM ads A
LEFT JOIN dept D ON D.id_dept = A.in_dpt
LEFT JOIN sub_cat_ad AS ON S.id_sub_cat = A.ads_in_Cat
WHERE MATCH(A.title, A.description) AGAINST(:searchTerm)
OR MATCH (S.sub_cat_name) AGAINST(:searchTerm)
有人可以告诉我为什么MySQL会返回:1191找不到与列列表匹配的FULLTEXT索引...除非我使用IN BOOLEAN MODE吗?
PS表S为每个colunm定义了全文。 MySQL ver 5.1.49
答案 0 :(得分:1)
使用时是否仍然出现错误:
SELECT A.idAd,
A.ads_in_Cat,
A.title,
A.currency,
A.price,
A.in_dpt,
A.description,
D.*,
s.*
FROM ads A
LEFT JOIN dept D ON D.id_dept = A.in_dpt
LEFT JOIN sub_cat_ad s ON s.id_sub_cat = A.ads_in_Cat
AND MATCH (s.sub_cat_name) AGAINST(:searchTerm)
WHERE MATCH(A.title, A.description) AGAINST(:searchTerm)