Skip to content

Commit

Permalink
Update product.go
Browse files Browse the repository at this point in the history
get product item db query fixex
  • Loading branch information
nikhilnarayanan623 authored Nov 10, 2023
1 parent 785395e commit 08c3cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/repository/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (c *productDatabase) FindAllProductItems(ctx context.Context,

query := `SELECT p.name, pi.id, pi.product_id, pi.price, pi.discount_price,
pi.qty_in_stock, pi.sku, p.category_id, sc.name AS category_name,
mc.name AS main_category_name p.brand_id, b.name AS brand_name
mc.name AS main_category_name, p.brand_id, b.name AS brand_name
FROM product_items pi
INNER JOIN products p ON p.id = pi.product_id
INNER JOIN categories sc ON p.category_id = sc.id
Expand Down

0 comments on commit 08c3cce

Please sign in to comment.