Update Detailed Product Viev
This commit is contained in:
@@ -12,9 +12,10 @@ class ProductService {
|
||||
|
||||
static async getDetailedProductById(productId) {
|
||||
return await db.getAsync(
|
||||
`SELECT p.*, c.name as category_name
|
||||
`SELECT p.*, c.name as category_name, l.country, l.city, l.district
|
||||
FROM products p
|
||||
JOIN categories c ON p.category_id = c.id
|
||||
JOIN locations l ON p.location_id = l.id
|
||||
WHERE p.id = ?`,
|
||||
[productId]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user