I have a function to get mysql query results, but for some reason the con.query code block is never entered, but no error is given. How would I go about debugging this issue?exports.getResult = function (query, dbconfig) {return new Promise(function(resolve, reject) {var con = mysql.createConnection(dbconfig)console.log(con.config.user.toString())// Can't enter herecon.query(query, function (err, rows, fields) {console.log("****test****")if (err) {return reject(err); }resolve(rows); }); });}
Submitted August 01, 2020 at 12:11PM by RamsenMC
No comments:
Post a Comment