Diff of /src/org/esb/web/SqlUtil.cpp [07f693] .. [1cff17]  Maximize  Restore

Switch to side-by-side view

--- a/src/org/esb/web/SqlUtil.cpp
+++ b/src/org/esb/web/SqlUtil.cpp
@@ -23,9 +23,10 @@
           sql += "INSERT INTO " + tablename;
         std::map<std::string, std::string>::iterator elit = data.begin();
         for (; elit != data.end(); elit++) {
-          if ((*elit).first == "id")continue;
-          if (update)
-            sql += " " + (*elit).first + "=:" + (*elit).first + ", ";
+          if (update){
+            if ((*elit).first == "id")continue;
+              sql += " " + (*elit).first + "=:" + (*elit).first + ", ";
+          }
           else {
             fields += (*elit).first + ", ";
             values += ":" + (*elit).first + ", ";
@@ -46,10 +47,10 @@
 
         elit = data.begin();
         for (; elit != data.end(); elit++) {
-          if((*elit).first!="id"){
+//          if((*elit).first!="id"){
             pstmt.setString((*elit).first, (*elit).second);
             logdebug("map2sql: "<<(*elit).first<<"="<<(*elit).second);
-          }
+//          }
         }
         pstmt.execute();
       }

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks