我需要帮助从匿名函数返回变量
connection.connect();
connection.query('SELECT * FROM myTable', function (error, results, fields) {
if (error) throw error;
//i want return variable results, just 'return result;' not work's
return results;
}
connection.end();
console.log(results); //not work's