jason310771 Posted March 22, 2014 Share Posted March 22, 2014 I wish to know how google does their search, say there is a road called St. John's Road in my database and I type in my ajax-auto-sugestion field...St JohnHow can I get the auto-selection to show the road that is LIKE the content but do not use the . or the ' in the databaseIf I was to start to type...St. Johnthen it would of course show the suggestion as I used the .Can this be done ?My fields have the proper names of the roads and I use utf8_general_ci for the road name field and the LIKE method to get the results. Quote Link to comment Share on other sites More sharing options...
fenway Posted March 27, 2014 Share Posted March 27, 2014 You can use REGEXP -- but it won't be very efficient. Quote Link to comment Share on other sites More sharing options...
Psycho Posted March 27, 2014 Share Posted March 27, 2014 Look into FULL-TEXT searching. It allows you to search for matches that are 'similar' but don't have to be exact matches and it supplies a match quotient as to how close the match is. Quote Link to comment 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.