I am struggling to work out the syntax for joining a normal multi table query with single table fulltext. I can't get my head around the syntax
This is the existing syntax which works fine:
SELECT * FROM products,categories,sub_categories
WHERE products.approved = 1
AND products.main_category = categories.id
AND products.sub_category = sub_categories.id
My efforts to add fulltext are not cutting it. This is the query i am trying to use fo the search:
MATCH(product_name,code,tag_1,tag_2,tag_3,tag_4,tag_5,details)
AGAINST ('keyword') AS score FROM products
WHERE MATCH(product_name,code,tag_1,tag_2,tag_3,tag_4,tag_5,details) AGAINST('keyword')
This is what i came up with, but for (probably obvious) reasons unknown to me, its not working.
SELECT * FROM products,categories,sub_categories
WHERE products.approved = 1
AND products.main_category = categories.id
AND products.sub_category = sub_categories.id
AND MATCH(product_name,code,tag_1,tag_2,tag_3,tag_4,tag_5,details)
AGAINST ('keyword') AS score FROM products
WHERE MATCH(product_name,code,tag_1,tag_2,tag_3,tag_4,tag_5,details) AGAINST('keyword')
Any help would be much appreciated!