How to count Array only if new id

Viewed 58

if i wanna count this array something like this:

$customerOrder = $this->Order->find('count', array(
                'conditions' => array(
                    'Order.customer_id >=' => '1',
                    'Order.status' => 'Delivered'
                )
            ));

I only wanna count $customerOrder if Order.customer_id have new id number.

fx: if id 1 have delivered 5 orders then i dont wanna count as 5, but only as 1 new order.

0 Answers
Related