Answers for "Running multiple queries at same time"

0

Running multiple queries at same time

var pool  = mysql.createPool({
  connectionLimit : 10,
  host            : 'example.org',
  user            : 'bobby',
  password        : 'pass',
  database        : 'schema'
});

for(var i=0;i<10;i++){
  pool.query('SELECT ` as example', function(err, rows, fields) {
    if (err) throw err;
    console.log(rows[0].example); //Show 1
  });
 }
Posted by: Guest on August-25-2021

Code answers related to "Running multiple queries at same time"

Code answers related to "Javascript"

Browse Popular Code Answers by Language