mysql联合与全文搜索错误

时间:2013-06-14 15:49:07

标签: mysql full-text-search union

我编写了一个查询来使用带有union的sql全文搜索来获取结果。但它得到了一个错误,我尝试了很多,无法纠正。错误是

  

#1064 - 您的SQL语法出错;检查与MySQL服务器版本对应的手册,以获得正确的语法   靠近'WHERE MATCH(product_name)AGAINST('+ epson + kit'IN BOOLEAN   MODE)和p.publ'在第3行

  SELECT 
p.virtuemart_product_id, l.product_name 
FROM jos_virtuemart_products AS p, jos_virtuemart_products_dk WHERE
MATCH(1.product_name) AGAINST ('+epson +kit' IN BOOLEAN MODE) 
AND p.published = '1' 
AND p.virtuemart_product_id = l.virtuemart_product_id LIMIT 0,25
UNION(SELECT 
p.virtuemart_product_id, l.product_name 
FROM jos_virtuemart_products AS p, jos_virtuemart_products_dk WHERE 
MATCH(product_sku) AGAINST ('+epson +kit' IN BOOLEAN MODE) 
AND p.published = '1'
AND p.virtuemart_product_id = l.virtuemart_product_id LIMIT 0,25
)

任何人都可以帮我纠正这个问题。 谢谢

1 个答案:

答案 0 :(得分:0)

它在... MATCH(1.product_name)... 您使用的是数字1而不是字符l(L) 它们看起来很相似:)