I have 2 tables as follows: product table | product_id | name | category_id | 1 | coffee| 2 | 3 | orange|1 | 5 | mango|1 | 2 | tea |2
and category table |category_id | category_name | |2 | drinks | |1 | fruit | |4 | desert | |5 | main | I want to get how many product in each category using sql statement, but I keep getting NULL for the one that doesn;t have product link. I want to get result from all category like this: drinks (2), fruit(2), desert(0), main(0). Help please... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php