From 77bcc9032562082b8bde4800c5fb6d1474077979 Mon Sep 17 00:00:00 2001 From: llopis15 Date: Tue, 16 Mar 2021 13:36:34 +0100 Subject: [PATCH] selectSql ordered --- db/selectDB.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/selectDB.js b/db/selectDB.js index f2aacca..386ddbd 100644 --- a/db/selectDB.js +++ b/db/selectDB.js @@ -6,7 +6,8 @@ function select(collectionFk, callback){ FROM ticketCollection tc JOIN ticket t ON t.id = tc.ticketFk JOIN client c ON t.clientFk = c.id JOIN agencyMode am ON am.id = t.agencyModeFk - WHERE tc.collectionFk = ${collectionFk}`; + WHERE tc.collectionFk = ${collectionFk} + ORDER BY tc.wagon, tc.level`; con.con.query(consSql, function (err, result, fields) { console.log(result);