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);