I'm trying to find way to let the user search for addresses in a database similar googles maps does. That means, if the search string is something like 'Denver' the user will get just one result, because there's only one city in the db with extactly the same name. If it is something like 'Denver av' there might be more results, including the streets, not the city. If it is 'Denver Av LA' its just one again, beacuse theres only one Denver Av in LA. Could also be 'LA Denver Av'. That means a set of combinations leads to the same result. In Google you can also search for 'Denver LA av', but that's not necessary. Anyone beeing occupied with this before? I'm thankful for every hint. Supported columns should be street, zip, city, streetno. Table has about 1000 rows. My first approach was to concat every column and use 'like'. But that did not really work. Hopy you have some ideas.
Yes, php with mysql. I'm currently trying to solve this with a view or stored procedure. But still don't have a clue how to start. Maybe a regexp in a concated string?
Edit: And perhaps a extra column for the quality of the match.