This is an example of a query I've tried:
const order = req.params.order
connection.query('select * from students order by first_name key=?', order, (err)=>{
...
});
By default without specifying the way, I retrieve the information ordered by first_name asc.
I would like the data ordered by asc or desc according what has been sent through the params.