dflow Posted February 12, 2012 Share Posted February 12, 2012 i have a db with different names for the same place i want to choose only one name from the list according to the GPS coordinates how would one select a distinct city_name from a list with same GPS coordinates and (that is 2 operands) CREATE TABLE `worldcitylist` ( `country_id` int(11) NOT NULL, `countrycode` varchar(2) NOT NULL, `city_name` varchar(255) NOT NULL DEFAULT '', `region_id` varchar(100) NOT NULL, `Lat` float(17,15) NOT NULL, `Lng` float(17,15) NOT NULL, `city_id` int(11) NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`city_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; Quote Link to comment Share on other sites More sharing options...
requinix Posted February 12, 2012 Share Posted February 12, 2012 i want to choose only one name from the list according to the GPS coordinates Which one? Random? First? First in what order? Quote Link to comment Share on other sites More sharing options...
dflow Posted February 12, 2012 Author Share Posted February 12, 2012 i want to choose only one name from the list according to the GPS coordinates Which one? Random? First? First in what order? actually i don't know, the list is too long and places have different ways of being spelled.(i'll need to decide on that later) let's say Random at first for example the following name for a place in Andora country_id,countrycode,City,city_name,region_id,Lat,Lng,city_id 127,ad,bicisarri,Biçisarri,06,42.483333587646484,1.466666698455811,10017 127,ad,bixessarri,Bixessarri,06,42.483333587646484,1.466666698455811,10018 127,ad,bixisarri,Bixisarri,06,42.483333587646484,1.466666698455811,10019 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.