ordenar los temas por fecha
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ app.get('/temaLibro', async(req, res) => {
|
||||
res.status(400).json({error: true, msj: 'Falta la categoria del libro como parametro'});
|
||||
return;
|
||||
}
|
||||
let sqlString = `SELECT * FROM Libro WHERE categoria='${data.categoria}';`;
|
||||
let sqlString = `SELECT * FROM Libro WHERE categoria='${data.categoria}' ORDER BY year DESC;`;
|
||||
console.log(` Esta es la cadena : ${sqlString}`);
|
||||
let respuestaSql = await query(sqlString);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user