diff --git a/models/tourModel.js b/models/tourModel.js index 953de6e3f31cb0717915e94b72d2a9581658ebf9..bce5e6bf58018e743b92a519f4eb5f69a6f992ef 100644 --- a/models/tourModel.js +++ b/models/tourModel.js @@ -79,7 +79,7 @@ class Tour { // ดึงทัวร์ตาม ID static async getTourById(tourId) { const query = ` - SELECT t.id, t.name, t.description, t.price, t.duration, t.userId, c.name AS company_name + SELECT t.id, t.name, t.description, t.price, t.duration, t.userId, c.name AS cname FROM tours t JOIN company c ON t.company_id = c.id WHERE t.id = ?`;