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 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. 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. Link to comment https://forums.phpfreaks.com/topic/18175-match-query/#findComment-78179 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.