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

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

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

revision 122 by torben, Sun Dec 2 16:56:14 2007 UTC revision 123 by torben, Sun Dec 2 17:12:00 2007 UTC
# Line 4  Line 4 
4  #include <tntdb/result.h>  #include <tntdb/result.h>
5  #include <tntdb/row.h>  #include <tntdb/row.h>
6    
 //#include <vector>  
 #include <sstream>  
   
 /*  
 class CriticalInstallation  
 {  
 public:  
         CriticalInstallation() {}  
         CriticalInstallation(int i, std::string m) : id(i), message(m) {}  
         int id;  
         std::string message;  
 };*/  
   
7  </%pre>  </%pre>
8    
9  <%config>  <%config>
# Line 29  dburl; Line 16  dburl;
16    
17  <{  <{
18    
   
 //std::vector<CriticalInstallation> criticals;  
   
19  tntdb::Connection conn = tntdb::connect(dburl);  tntdb::Connection conn = tntdb::connect(dburl);
20    
 /*  
 tntdb::Result res = conn.select("SELECT id FROM installation WHERE commerror = true");  
 for (int i=0; i<res.size(); ++i)  
 {  
         criticals.push_back(CriticalInstallation(res[i].getInt(0), std::string("Communication Error")));  
 }*/  
   
21    
22  std::string query1;  std::string query1;
23  query1 += "SELECT c.name, i.description, i.id ";  query1 += "SELECT c.name, i.description, i.id ";
# Line 51  query1 += "ON i.customerid = c.id"; Line 28  query1 += "ON i.customerid = c.id";
28  tntdb::Result inst_res = conn.select(query1);  tntdb::Result inst_res = conn.select(query1);
29    
30    
   
31  std::string query2;  std::string query2;
32  query2 += "SELECT commerror,temperature,flamedetector,conveyorerror,powerfailure ";  query2 += "SELECT commerror,temperature,flamedetector,conveyorerror,powerfailure ";
33  query2 += "FROM logtable ";  query2 += "FROM logtable ";

Legend:
Removed from v.122  
changed lines
  Added in v.123

  ViewVC Help
Powered by ViewVC 1.1.20