insert multiple rows into mysql through node.js -
i want insert multiple rows mysql thru node.js mysql module. info have
var info = [{'test':'test1'},{'test':'test2'}];
i using pool
pool.getconnection(function(err, connection) { connection.query('insert '+table+' set ?', data, function(err, result) { if (err) throw err; else { console.log('successfully added db'); connection.release(); } }); }); }
which fails.
is there way me have mass insertion , phone call function when insertion finishes?
regards hammer
you can insert multiple rows mysql using nested arrays. can see reply post: how do mass insert in mysql using node.js
mysql node.js node-mysql
No comments:
Post a Comment