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. Link to comment https://forums.phpfreaks.com/topic/287190-how-to-search-only-letters-and-numbers-in-tables/ 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. Link to comment https://forums.phpfreaks.com/topic/287190-how-to-search-only-letters-and-numbers-in-tables/#findComment-1474171 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. Link to comment https://forums.phpfreaks.com/topic/287190-how-to-search-only-letters-and-numbers-in-tables/#findComment-1474194 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.