33 |
" SELECT name,latitude,longitude,stationcode, " + |
" SELECT name,latitude,longitude,stationcode, " + |
34 |
" earth_distance( ll_to_earth(latitude,longitude), ll_to_earth(?,?))::int AS calcdist " + |
" earth_distance( ll_to_earth(latitude,longitude), ll_to_earth(?,?))::int AS calcdist " + |
35 |
" FROM trainstations " + |
" FROM trainstations " + |
36 |
|
" WHERE latitude IS NOT NULL AND longitude IS NOT NULL " + |
37 |
" ) AS trainstations2 " + |
" ) AS trainstations2 " + |
38 |
"ORDER BY calcdist ASC " + |
"ORDER BY calcdist ASC " + |
39 |
"LIMIT 4 "; |
"LIMIT 4 "; |