From dd31de2c8a93753bcc6c804147bd5839d6bb143f Mon Sep 17 00:00:00 2001
From: Atiwit Pattanapukdee <65160394@go.buu.ac.th>
Date: Wed, 26 Mar 2025 17:45:24 +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 1774d05..5576543 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 = ?`;
-- 
GitLab