How to count array only if new id

if i want to count this array something like this:

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

      

I only want to calculate $ customerOrder if Order.customer_id has a new id.

fx: if id 1 has placed 5 orders, then I don't want to count 5, but only as 1 new order.

+3


source to share





All Articles