The Little Guy Posted October 1, 2010 Share Posted October 1, 2010 Is it possible to do a match against on a left join? I am getting this error: "Incorrect arguments to MATCH" SELECT * FROM news n LEFT JOIN news_story s ON(n.id = s.newsid) WHERE MATCH(n.headline, s.story) AGAINST ('$search') AND ($impl) How can I do this? Quote Link to comment https://forums.phpfreaks.com/topic/214949-left-join-match-against/ Share on other sites More sharing options...
The Little Guy Posted October 2, 2010 Author Share Posted October 2, 2010 Got it. SELECT n.id, n.headline, n.category, s.story,MATCH(n.headline) AGAINST ('$search' IN BOOLEAN MODE) AS score1,MATCH(s.story) AGAINST ('$search' IN BOOLEAN MODE) AS score2FROM news n LEFT JOIN news_story s ON(n.id = s.newsid) WHEREMATCH(n.headline, s.story) AGAINST ('$search' IN BOOLEAN MODE) AND($impl) ORDER BY score1 DESC, score2 DESC Quote Link to comment https://forums.phpfreaks.com/topic/214949-left-join-match-against/#findComment-1118220 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.