node.js - How to JOIN two SQL tables from the front end/ what REST api would i use -


this 2 part question. i'm wanting have tables join id's when want join happen function front end (ie button click or similar). i'm wondering rest command use wanting this? i'm thinking get? , if how pass 2 id's end request? understand how 1 parameter with:

this.testname = function(id) { return $http({       method: 'get',   url: '/api/order/:id' }).then(function(response) {   console.log(response);   return response.data }); 

};

i think simple passing in second parameter , i'm not sure need make url in node pass in 2 separate id's. , appreciated, if i'm overthinking please slap sense me!

you thinking correctly. create , endpoint return want based on request.

to pass 2 ids try this:

url: '/api/order/:orderid/otherid/:otherid' 

Comments