Teamwolf2000 Posted May 14, 2007 Share Posted May 14, 2007 Hi, I wondered if any of you experts could help me. I am trying to query a keyword table and return the items that are joined to the keyword table via a simple join table. I would like to use the Match Against on the query as a search. The following query works as expected: SELECT GalleryItem.* FROM GalleryItem, Keywords, KeyItemJoin WHERE GalleryItem.ID = KeyItemJoin.ItemID AND Keywords.keyword LIKE $SearchId LIMIT 0 , 30 Using Match Against include in the query (below) returns Zero results, but should return some results: SELECT GalleryItem. * , MATCH (Keywords.Keyword) AGAINST ($SearchId) AS score FROM GalleryItem, Keywords, KeyItemJoin WHERE GalleryItem.ID = KeyItemJoin.ItemID AND MATCH (Keywords.Keyword) AGAINST ($SearchId) LIMIT 0 , 30 I am sure its prety simple, but I can not get it to work correctly. Any help much appreciated. Many thanks. Quote Link to comment https://forums.phpfreaks.com/topic/51288-solved-match-against-query-help-required/ Share on other sites More sharing options...
fenway Posted May 14, 2007 Share Posted May 14, 2007 Hard to say without some data... but usally this means too many rows match; full-text indexing is weird like that. Quote Link to comment https://forums.phpfreaks.com/topic/51288-solved-match-against-query-help-required/#findComment-253079 Share on other sites More sharing options...
Teamwolf2000 Posted May 15, 2007 Author Share Posted May 15, 2007 Hi, Thanks for the response. here is the site it is on: www.frittendenphotos.co.uk I have also attached the SQL file I would like the search to use the query above to select the items based on the serch text from the keyword table. Many thanks for your help and time. Cheers, [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/51288-solved-match-against-query-help-required/#findComment-253567 Share on other sites More sharing options...
fenway Posted May 15, 2007 Share Posted May 15, 2007 Like I said, with only 5 entries, if more than half of the records match, you won't get any results. Quote Link to comment https://forums.phpfreaks.com/topic/51288-solved-match-against-query-help-required/#findComment-253650 Share on other sites More sharing options...
Teamwolf2000 Posted May 15, 2007 Author Share Posted May 15, 2007 opps sorry, I didnt understand that its on a percentage basis. I totaly see what your saying. Many thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/51288-solved-match-against-query-help-required/#findComment-253675 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.