--- trunk/tntnet/dynamic/critical.ecpp 2007/12/05 10:47:51 156 +++ trunk/tntnet/dynamic/critical.ecpp 2007/12/08 16:47:03 195 @@ -18,7 +18,7 @@ reply.setHeader("Refresh", "120"); -tntdb::Connection conn = tntdb::connect(dburl); +tntdb::Connection conn = tntdb::connectCached(dburl); std::string query1; @@ -34,7 +34,7 @@ query2 += "SELECT temperature,flamedetector,conveyorerror,powerfailure "; query2 += "FROM logtable "; query2 += "WHERE installationnr = :v1 "; -query2 += "ORDER BY messagenr DESC "; +query2 += "ORDER BY messagenr DESC,logtime DESC "; query2 += "LIMIT 1";