I am trying to update multiple fields, but some of the fiellds is not updating, it looks like a problem of locking.
the code:
for(var param in params) {
(function(params) {
var value = (param == 'strongTraffic' || param == 'isSocialChecked') ? '='+params[param]+'' : '="'+params[param]+'"';
var sql = 'update db set '+ param + value +
' where tbl="checkingCelebs" And idSocial="'+idSocial + '"';
couch.sql(sql,function(err,updated) {
if (err) inCommon.error((sql));
});
})(params);
}