NodeJS My SQL query with Chain promise
问题 I have 3 function and i want to call this function to step by step, for example when i will call firs function and get result, i have to call second function and pass parameter returned from first call. after i will finish second call i have to call third function and pass parameter returned from second function. #1: getCategory = function (branch_id) { var deferred = q.defer(); var categoryData; var query = 'SELECT id,name,price,currency FROM category where branch_id=?'; pool.getConnection