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? Quote 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? Quote 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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.