MySQL Forums
Forum List  »  Performance

Re: Adding keyword search (fulltext) to query
Posted by: Marc Ferland
Date: October 27, 2012 09:09AM

Thanks James.

EXPLAIN on original query: http://img600.imageshack.us/img600/4920/image1rk.jpg

I'm receiving a MySQL error when running that query:

SELECT `id`
FROM ( 
	(
		SELECT  `listing_id` AS `id`
		FROM  description_test
		WHERE  MATCH (`descriptions_test`.`description`)
		AGAINST ('swimming pool' IN BOOLEAN MODE)
	)
	UNION (
		SELECT `id`
		FROM  `listings`
		WHERE  `listings`.`category` = 1
		AND  `listings`.`city` = 35862
		AND  `listings`.`visible` = 1;
	)
)
GROUP BY `id`
HAVING  COUNT(*) = 2;

Error:

MySQL said: 

#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 '' at line 14

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Adding keyword search (fulltext) to query
830
October 27, 2012 09:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.