hankknight
asked on
mySQL Syntax Error: Match / Against
This returns an error
#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 'MATCH(`name`,`keywords`,` descriptio n`,`custom _keywords` ,`naics_ke ywords`, `naics' at line 1
#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 'MATCH(`name`,`keywords`,`
select * from `organizations`, MATCH(`name`,`keywords`,`description`,`custom_keywords`,`naics_keywords`, `naics_desc`, `p_city`, `promo_text`) AGAINST ('foo' WITH QUERY EXPANSION) AS RELEVANCE, WHERE replace(replace(`name`, ' ', ''),'\'', '') LIKE '%foo%' OR replace(`keywords`, ' ', '') LIKE '%foo%' OR MATCH (`name`,`keywords`,`description`,`custom_keywords`,`naics_keywords`, `naics_desc`, `p_city`, `promo_text`) AGAINST ('foo' WITH QUERY EXPANSION) ORDER BY `name` LIKE 'foo%' DESC, replace(`name`, ' ', '') LIKE 'foo%' ASC, `name` LIKE '%foo%' DESC, replace(`name`, ' ', '') LIKE '%foo%' ASC, RELEVANCE DESC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.