dpacaud hace 12 años
padre
commit
4475b38580
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      mysql-backend.js

+ 1 - 1
mysql-backend.js

@@ -66,7 +66,7 @@ StatdMySQLBackend.prototype.handleCounters = function(_counters, time_stamp) {
       continue;
     }
     else {
-      querries.push("insert into statistics('timestamp','name','value') values(" + time_stamp + ",'" + counter +"'," + value + ") on duplicate key value = value + " + value + ", timestamp = " + time_stamp);
+      querries.push("insert into statistics('timestamp','name','value') values(" + time_stamp + ",'" + counter +"'," + value + ") on duplicate key update value = value + " + value + ", timestamp = " + time_stamp);
     }
   }
   self.executeQuerries(querries);