Estoy llamando a una función que inserta una fila en MySQL. esto está dentro de un bucle, pero me da el error. Error: no se puede poner en cola el protocolo de enlace después de haber puesto en cola un protocolo de enlace.
var mysql = require('mysql'); var con = mysql.createConnection({ host: "fleet.iad1-mysql-e2-20a.dreamhost.com", user: "seesi", password: "saml3651", database: "bazaar_data" }); function run(){ con.connect(function(err) { if (err) throw err; console.log("Connected!"); //Insert a record in the "customers" table: var sql = "INSERT INTO Bazaar_Orders_Price (name, address, city, state) VALUES ('jeff', 'your face', 'Chicago', 'IL')"; con.query(sql, function (err, result) { if (err) throw err; console.log("1 record inserted"); }); }); } for(i=0; i<5; i++) { run() }