rondog Posted December 8, 2010 Share Posted December 8, 2010 Can I write a query to search by using the keyname rather than entering all the fields? For example, I have a colA,colB,colC indexed with a keyname searchableFields Right now I write: SELECT * FROM table WHERE MATCH(colA,colB,colC) AGAINST($someVar) I want to be able to just do it like this: SELECT * FROM table WHERE MATCH(searchableFields) AGAINST($someVar) When I do that, I get a: #1191 - Can't find FULLTEXT index matching the column list error. Any ideas? Link to comment https://forums.phpfreaks.com/topic/221078-searching-indexes-using-key-name/ Share on other sites More sharing options...
fenway Posted December 8, 2010 Share Posted December 8, 2010 That's not an option -- just list the column names -- what's the problem? Link to comment https://forums.phpfreaks.com/topic/221078-searching-indexes-using-key-name/#findComment-1144734 Share on other sites More sharing options...
rondog Posted December 10, 2010 Author Share Posted December 10, 2010 That's not an option -- just list the column names -- what's the problem? I have many columns, about 15 and it would just be easier to do keyname Link to comment https://forums.phpfreaks.com/topic/221078-searching-indexes-using-key-name/#findComment-1145569 Share on other sites More sharing options...
fenway Posted December 11, 2010 Share Posted December 11, 2010 If you really wanted, you could look up the index column in mysql's table, but it seems like a bother. Link to comment https://forums.phpfreaks.com/topic/221078-searching-indexes-using-key-name/#findComment-1145613 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.