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 "; |
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 |
|
|
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 |
|
|