--- android/TrainInfoService/src/dk/thoerup/traininfoservice/LocateStations.java 2009/09/01 19:17:18 292 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/LocateStations.java 2009/09/01 19:40:02 293 @@ -30,7 +30,7 @@ protected String getStations(Connection conn, double latitude, double longitude) throws SQLException { //inner select is workaround from not being able to use a calculated column directly in where clause final String SQL = "SELECT * FROM ( "+ - " SELECT name,latitude,longitude,address,stationcode, " + + " SELECT name,latitude,longitude,stationcode, " + " earth_distance( ll_to_earth(latitude,longitude), ll_to_earth(?,?))::int AS calcdist " + " FROM trainstations " + " ) AS trainstations2 " + @@ -59,10 +59,9 @@ buff.append("").append( res.getString(1) ) .append("\n"); buff.append("").append( res.getDouble(2) ) .append("\n"); - buff.append("").append( res.getDouble(3) ) .append("\n"); - buff.append("
").append( res.getString(4) ) .append("
\n"); - buff.append("").append( res.getString(5) ) .append("\n"); - buff.append("").append( res.getDouble(6) ) .append("\n"); + buff.append("").append( res.getDouble(3) ) .append("\n"); + buff.append("").append( res.getString(4) ) .append("\n"); + buff.append("").append( res.getInt(5) ) .append("\n"); buff.append("\n"); }