/[H9]/trunk/tntnet/dynamic/installationdetails.ecpp
ViewVC logotype

Diff of /trunk/tntnet/dynamic/installationdetails.ecpp

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

revision 126 by torben, Sun Dec 2 20:26:43 2007 UTC revision 195 by torben, Sat Dec 8 16:47:03 2007 UTC
# Line 32  int id; Line 32  int id;
32  <{  <{
33  tntdb::Connection conn;  tntdb::Connection conn;
34    
35  conn = tntdb::connect(dburl);  conn = tntdb::connectCached(dburl);
36    
37  std::stringstream query;  std::stringstream query;
38  query << "SELECT c.name, c.address AS caddress, i.description, i.address AS iadress, i.furnacetype, i.updaterate, i.commerror ";  query << "SELECT c.name, c.address AS caddress, i.description, i.address AS iadress, i.furnacetype, i.updaterate, i.commerror ";
# Line 74  if (res.size() >0 ) Line 74  if (res.size() >0 )
74          </tr>          </tr>
75          <tr>          <tr>
76                  <td>Comm. status: </td>                  <td>Comm. status: </td>
77                  <td><img src="bullet.php?rgb=<$ (res[0].getBool(6) ? "ff0000" : "00ff00") $>" alt="Status Indicator"></td>                  <td><img src="bullet?rgb=<$ (res[0].getBool(6) ? "ff0000" : "00ff00") $>" alt="Status Indicator"></td>
78          </tr>          </tr>
79    
80    
# Line 88  if (res.size() >0 ) Line 88  if (res.size() >0 )
88          query << "SELECT messagenr, date_trunc('second', logtime) AS logtime, temperature, flamedetector, solidfuelempty, conveyorerror,powerfailure ";          query << "SELECT messagenr, date_trunc('second', logtime) AS logtime, temperature, flamedetector, solidfuelempty, conveyorerror,powerfailure ";
89          query << "FROM logtable ";          query << "FROM logtable ";
90          query << "WHERE installationnr = " << id;          query << "WHERE installationnr = " << id;
91          query << "ORDER BY messagenr DESC";          query << "ORDER BY messagenr DESC, logtime DESC ";
92          res = conn.select(query.str());          res = conn.select(query.str());
93    
94    

Legend:
Removed from v.126  
changed lines
  Added in v.195

  ViewVC Help
Powered by ViewVC 1.1.20