| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Graham Anderson | Date: | March 31 2005 11:17pm |
| Subject: | Newbie: MYSQL nested query question | ||
| View as plain text | |||
What is the proper way to say this ? SELECT C.City, N.Distance FROM Cities C JOIN Nearbycities N ON C.CityId = N.PrimaryCityId WHERE N.CityId = (SELECT Cities.CityId FROM Cities WHERE Cities.city = 'Los Angeles') AND N.distance < 20 I am trying to enter in a city and get all the nearby cites with 20 miles Somehow, I need to join NearbyCities.PrimaryCityId, Cities.CityId, and Cities.city learning :)
| Thread | ||
|---|---|---|
| • Newbie: MYSQL nested query question | Graham Anderson | 1 Apr |
| • Re: Newbie: MYSQL nested query question | Philip M. Gollucci | 1 Apr |
| • Re: Newbie: MYSQL nested query question | Graham Anderson | 1 Apr |
| • Re: Newbie: MYSQL nested query question | Peter Brawley | 1 Apr |
| • Re: Newbie: MYSQL nested query question | Graham Anderson | 2 Apr |
| • Re: Newbie: MYSQL nested query question | Graham Anderson | 2 Apr |
| • Re: Newbie: MYSQL nested query question | SGreen | 5 Apr |
