selecting all orders for last 30 days, and counting how many per day
问题 I am trying to select all orders for last 30 days from one customer, so I need to have customer_id = "$customer_id" and count how many orders I have per each day for that one customer. I need to end up with array like this Array ( [1] => Array ( [orders] => 41 [date] => 2011-06-13 17:43:50 ) [2] => Array ( [orders] => 11 [date] => 2011-07-13 17:43:50 ) [4] => Array ( [orders] => 2 [date] => 2011-12-13 17:43:50 ) and so on... for 30 days, if some day I dont have any orders, I dont need array