neugi Posted August 21, 2006 Share Posted August 21, 2006 Hi, i've written this query:[code]SELECT h.id, h.kbeschreibung, hf.textFROM hauser AS hLEFT JOIN haus_fertigarten AS hf ON h.id = hf.hidWHERE MATCH (h.kbeschreibung, hf.text) AGAINST ('Loretto' IN BOOLEAN MODE)[/code]with this i get no resultif i use it like this it works[code]SELECT h.id, h.kbeschreibung, hf.textFROM hauser AS hLEFT JOIN haus_fertigarten AS hf ON h.id = hf.hidWHERE MATCH (h.kbeschreibung) AGAINST ('Loretto' IN BOOLEAN MODE) OR MATCH (hf.text) AGAINST ('Loretto' IN BOOLEAN MODE)[/code]maybe somebody can tell me why my first don't workthx Quote Link to comment https://forums.phpfreaks.com/topic/18175-match-query/ Share on other sites More sharing options...
shoz Posted August 21, 2006 Share Posted August 21, 2006 To perform the first query you need to have a FULLTEXT index on both columns in the order supplied to MATCHie[code]ALTER TABLE tablename ADD FULLTEXT(col1,col2);[/code]However, since the two columns are in different tables I don't think you can do that. Quote Link to comment https://forums.phpfreaks.com/topic/18175-match-query/#findComment-77951 Share on other sites More sharing options...
fenway Posted August 21, 2006 Share Posted August 21, 2006 Yeah, you can't have an index that spans tables. Quote Link to comment https://forums.phpfreaks.com/topic/18175-match-query/#findComment-78179 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.