--- android/TrainInfoService/src/dk/thoerup/traininfoservice/DumpResultSet.java 2010/05/18 17:56:43 733 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/DumpResultSet.java 2010/06/09 21:04:54 813 @@ -140,10 +140,26 @@ res = dumpResultset("SELECT * FROM trainstations WHERE aliases IS NOT null"); } else if (dump.equals("updatecoords")) { res = dumpUpdate("UPDATE trainstations SET earth_coord = ll_to_earth(latitude,longitude)"); + } else if (dump.equals("trainstatistics")) { + res = dumpResultset("SELECT * FROM trainstatistics ORDER BY statisticsdate"); + } else if (dump.equals("trainstatistics_avg")) { + res = dumpResultset("SELECT round(avg(location),1) as location, round(avg(name),1) as name, round(avg(favorites),1) as favorites, " + + "round(avg(departure),1) as departure, round(avg(depcache),1) as depcache, round(avg(deperror),1) as deperror, " + + "round(avg(timetable),1) as timetable, round(avg(timecache),1) as timecache, round(avg(timeerror),1) as timeerror " + + "FROM trainstatistics"); } } if (res == null) { - res = "All
All with links
Missing coords
Duplicate stations
Disabled stations
No address
Has aliases
update coords"; + res = "All
" + + "All with links
" + + "Missing coords
" + + "Duplicate stations
" + + "Disabled stations
" + + "No address
" + + "Has aliases
" + + "update coords
" + + "statistics
" + + "stats_avg
"; } resp.setContentType("text/html");