combine misspelled user input fields in a DISTINCT query
Posted on 2009-04-27
the query: "SELECT DISTINCT `City` FROM `residential` ORDER BY `City` ASC";
the above query returns distinct values as is should but the city field in the database is user defined and sometimes misspelled witch causes a second, third, and froth value for that city.
then when trying to use that misspelled city to get the ares of town form the database only the area of town from that misspelled entry are displayed.
query for area of town: "SELECT DISTINCT `Area` FROM `residential` WHERE `City` LIKE \"%$city%\" ORDER BY `Area` ASC";
Is there any way to combine the distinct results that are similar? Or am i going about this the wrong way?