我尝试编写一些代码,但我发现了一些问题......
这是我的桌子......
类别表
+---------------------------+-----------------------+
+ id_category + name +
+---------------------------+-----------------------+
+ 1 + Adidas +
+ 2 + Logo +
+ 3 + Levis +
+---------------------------+-----------------------+
项目表:
+---------+-----------------+-----------------------+
+ id_item + id_category + name +
+---------+-----------------+-----------------------+
+ 1 + 1 + T-Shirt003 +
+ 2 + 2 + LogoShoes +
+ 3 + 3 + Panty003 +
+---------------------------+-----------------------+
我想得到这样的结果:
No. Category Total Item
1. Adidas 1
2. Logo 1
3. Levis 1
谁能帮我?