Problem with updating multiple fields inside for in nodejs

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);
                    }

Hey @roycouch,
Can you elaborate on your explanation for what you are trying to do, and what it is doing that you did not expect?

Cheers, Brett

hi @brett19 i found the solution thanks.