Good day. I work with node js. I have a function that returns the values selected from the database. Code on the server
function selectingManufacturer(callback) { var manufacturerdbArr = []; pool.pool.query('select name from manufacturer', function (err, results) { if (err) { callback(err,null); }else { for (var i = 0; i < results.length; i++) { manufacturerdbArr.push(results[i].name); } callback(err,manufacturerdbArr); } }); } selectingManufacturer(function(err,manufacturerdbArr){ if(err){ console.log("ERROR : ",err); }else{ .... }); But besides the data from one table, I need to select them from another. Is it possible to do this and that the data from both tables would be available in one function? I understand approximately how it should work, but in practice it does not work out