a_naguib_2000 Posted July 19, 2007 Share Posted July 19, 2007 Hi all, This is my first post here in phpfreaks.com and I have a problem.. I need to make a database with mysql with about 50,000 names and details about them.. The problem is that I need to make an advanced search function that can get all the names which are similar to the search query, for example, when the user searches for "jessy", the search results should include all the variations of jessy like "jessy", "jessi", "jissy", "jess", "gessy", "gessi", "jessika", "jessica", ... etc. How to do such a function? and do you think using regular expressions in such cases is overloading mysql or apache server or will cause problems when doing thousands of queries in the same time?? Quote Link to comment https://forums.phpfreaks.com/topic/60744-names-database-advanced-search/ Share on other sites More sharing options...
DeadEvil Posted July 19, 2007 Share Posted July 19, 2007 $query = mysql_query("SELECT field_name FROM table_name WHERE field_name LIKE '%".$variable."%'"); Quote Link to comment https://forums.phpfreaks.com/topic/60744-names-database-advanced-search/#findComment-302180 Share on other sites More sharing options...
MadTechie Posted July 19, 2007 Share Posted July 19, 2007 @DeadEvil, please read the question first!! as for a Fuzzy Matching RegEx, i am not 100% sure.. Quote Link to comment https://forums.phpfreaks.com/topic/60744-names-database-advanced-search/#findComment-302273 Share on other sites More sharing options...
effigy Posted July 19, 2007 Share Posted July 19, 2007 - SOUNDEX (The only MySQL option I know of) - levenshtein - Lucene Quote Link to comment https://forums.phpfreaks.com/topic/60744-names-database-advanced-search/#findComment-302337 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.