try this:
$this-Invoice-findAll(null, array('DISTINCT Invoice.customer_id'));
On Thu, May 28, 2009 at 1:58 PM, Matt mmanai...@gmail.com wrote:
I am trying to get a distinct list of invoices based on the
customer_id using the following line:
$this-set('invoices',
I am trying to get a distinct list of invoices based on the
customer_id using the following line:
$this-set('invoices', $this-Invoice-findAll(null, 'DISTINCT
customer_id'));
Problem is that it doesn't work as it should since the query comes out
like this:
SELECT DISTINCT