This code working
let result = await mysqlconnection.query("SELECT * from table");
result
contains some info without actual result from MySQL, but have connection and config properties;
result[0]
returns null, but I need data from MySQL, so when I tried using
mysqlconnection.query("SELECT * from table", function(err, results){
console.log(results);
});
it prints what I need, but asynchronically. My question is how to combine synchronous execution and get results?