From 370670161d87d6931c644c6d0583d7a96adb856b Mon Sep 17 00:00:00 2001 From: Atiwit Pattanapukdee <65160394@go.buu.ac.th> Date: Wed, 26 Mar 2025 17:38:32 +0700 Subject: [PATCH] Project Round 11 --- models/tourModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/tourModel.js b/models/tourModel.js index 953de6e..bce5e6b 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 = ?`; -- GitLab