diff --git a/models/tourModel.js b/models/tourModel.js index 1774d0505fdafc54f270a26e9b7f86d511d81301..5576543771f28223ee2c9008558370a8b7db141e 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 cname + SELECT t.id, t.name, t.description, t.price, t.duration, t.userId, c.cname AS cname FROM tours t JOIN company c ON t.companyid = c.id WHERE t.id = ?`;