How do I limit HABTM results with find function?

2006-07-12 Thread [EMAIL PROTECTED]
I have a HABTM relationship between Products and Logos. When I use something like this: $this-set('data', $this-Product-find(id = 2, null, null, 1)); The result is the following: Array ( [Product] = Array ( [id] = 2 [name] = Chase and Ken T-Shirt

Re: How do I limit HABTM results with find function?

2006-07-12 Thread Samuel DeVore
try array('Logo.company_id'=1,'Product.id'=2) On 7/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:I have a HABTM relationship between Products and Logos. When I use something like this:$this-set('data', $this-Product-find(id = 2, null, null, 1));The result is the following:Array([Product] =

Re: How do I limit HABTM results with find function?

2006-07-12 Thread [EMAIL PROTECTED]
Thanks much for the help, but what exactly do you mean (and what syntax should I use)? Samuel DeVore wrote: try array('Logo.company_id'=1,'Product.id'=2) On 7/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a HABTM relationship between Products and Logos. When I use something