Below is the SQL statement, I am having difficulty placing a where statement that gets the score generated by match and only return products that score over 6.
SELECT product_id, image, title, part_num, price, discount_id, vat,
MATCH (title,part_num,description)
AGAINST ('SEARCH HERE') AS score
FROM main_products AS p
WHERE status = 1
AND MATCH(title,part_num,description) AGAINST ('SEARCH HERE')
ORDER BY score desc, title ASC
I have tried but this doesn't work. It results in this error: Documentation #1054 - Unknown column 'score' in 'where clause'
SELECT product_id, image, title, part_num, price, discount_id, vat,
MATCH (title,part_num,description)
AGAINST ('SEARCH HERE') AS score
FROM main_products AS p WHERE status = 1 AND score > 6
AND MATCH(title,part_num,description) AGAINST ('SEARCH HERE')
ORDER BY score desc, title ASC