I’ve try to make some code, but I found some problem…
This is my tables….
category table
+---------------------------+-----------------------+
+ id_category + name +
+---------------------------+-----------------------+
+ 1 + Adidas +
+ 2 + Logo +
+ 3 + Levis +
+---------------------------+-----------------------+
item table :
+---------+-----------------+-----------------------+
+ id_item + id_category + name +
+---------+-----------------+-----------------------+
+ 1 + 1 + T-Shirt003 +
+ 2 + 2 + LogoShoes +
+ 3 + 3 + Panty003 +
+---------------------------+-----------------------+
and I want to make a result like this :
No. Category Total Item
1. Adidas 1
2. Logo 1
3. Levis 1
Can anyone help me?
Use the
GROUP BYoption