I\'m a newbie both on event/callback style programming and NodeJS. I\'m trying to implement a little http server which serves ddbb data using node-mysql module.
My p
Another solution is to concatenate all statements, ending each with a semicolon. For example, to select from multiple tables you could use this query:
var sql = 'select * from user; select * from admin;'
Then, you can use only one connection to execute the multiple statements:
var connection = mysql.createConnection({multipleStatements: true})
connection.query(sql)
Note: Multiple statements is disabled by default to prevent SQL injection. Be sure to properly escape all values (see docs).