与全文搜索错误的MySQL联合 [英] mysql union with fulltext search error
问题描述
我编写了一个查询,以使用带有工会的sql全文搜索获得结果.但它得到了一个错误,我尝试了很多,无法纠正.错误是
I write a query to get results using my sql full text search with union. but it getting a error i tried a lot and can't correct. the error is
#1064-您的SQL语法有错误;检查与您的MySQL服务器版本相对应的手册以使用正确的语法在'WHERE MATCH(product_name)AGAINST('+ epson + kit'IN BOOLEANMODE)和p.publ'在第3行
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE MATCH(product_name) AGAINST ('+epson +kit' IN BOOLEAN MODE) AND p.publ' at line 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
)
任何人都可以帮助我纠正此问题.谢谢
Can anyone help me to correct this. Thank You
推荐答案
它位于... MATCH(1.product_name)...您正在使用数字1而不是字符l(L)他们看起来很相似:)
It is in ... MATCH(1.product_name) ... You are using the number 1 instead of the character l (L) they look similar though :)
这篇关于与全文搜索错误的MySQL联合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!