/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/SavedStatistics.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/SavedStatistics.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1811 by torben, Thu Apr 28 18:50:24 2011 UTC revision 1812 by torben, Sat Jun 9 11:35:22 2012 UTC
# Line 72  public class SavedStatistics extends Htt Line 72  public class SavedStatistics extends Htt
72                          ResultSet resAvg = stmt.executeQuery(sqlAvg);                          ResultSet resAvg = stmt.executeQuery(sqlAvg);
73                          resAvg.next();                          resAvg.next();
74                          SavedStatBean avgBean = convertRow(resAvg);                          SavedStatBean avgBean = convertRow(resAvg);
75    
76                            //////
77                            String sql30Avg = "SELECT count(*) AS count, round(avg(location+name+favorites),1) AS station, round(avg(location),1) as location, round(avg(name),1) as name, round(avg(favorites),1) as favorites, " +
78                            "round(avg(departure),1) as departure, round(avg(depcache),1) as depcache, round(avg(deperror),1) as deperror, " +
79                            "round(avg(timetable),1) as timetable, round(avg(timecache),1) as timecache, round(avg(timeerror),1) as timeerror " +
80                            "FROM trainstatistics " +
81                            "WHERE statisticsdate < now()::date AND statisticsdate >= (now()::date - interval '30 days')";
82                            
83                            ResultSet res30Avg = stmt.executeQuery(sql30Avg);
84                            res30Avg.next();
85                            SavedStatBean avg30Bean = convertRow(res30Avg);                
86                                                    
87                          ////////////////////////////////////////////////                          ////////////////////////////////////////////////
88                                                    
# Line 95  public class SavedStatistics extends Htt Line 106  public class SavedStatistics extends Htt
106                                                    
107                                                    
108                          request.setAttribute("avg", avgBean);                          request.setAttribute("avg", avgBean);
109                            request.setAttribute("avg30", avg30Bean);
110                          request.setAttribute("stats", stats);                          request.setAttribute("stats", stats);
111                          request.setAttribute("top5", top5);                          request.setAttribute("top5", top5);
112                          request.getRequestDispatcher("/savedstatistics.jsp").forward(request, response);                          request.getRequestDispatcher("/savedstatistics.jsp").forward(request, response);

Legend:
Removed from v.1811  
changed lines
  Added in v.1812

  ViewVC Help
Powered by ViewVC 1.1.20