开发者

How to get total number of products in virtuemart?

开发者 https://www.devze.com 2023-01-16 03:16 出处:网络
I want to display total numbe开发者_开发知识库r of products sold for each product. There are around 30 products in my virtue mart and I want each one\'s total sold number.

I want to display total numbe开发者_开发知识库r of products sold for each product. There are around 30 products in my virtue mart and I want each one's total sold number.

Table named jos_vm_order_item contains product_id and product_quantity with all other information.

How can I display this?


SELECT O.product_id,
       SUM(O.product_quantity) as Total_Sold
  FROM jos_vm_order_item O
 GROUP BY O.product_id
0

精彩评论

暂无评论...
验证码 换一张
取 消