Re: Help - Can't write the SQL query in CakePHP style

2009-10-20 Thread logout
Oh, I tried with the Containable behavior, but without any luck... On Oct 16, 11:04 am, "Dr. Loboto" wrote: > Not any helpful reply, but... your query will work with "Invoice > hasOne Writedown". > And you can try Containable > behavior:http://book.cakephp.org/view/474/Containable > > On Oct 15

Re: Help - Can't write the SQL query in CakePHP style

2009-10-20 Thread logout
Yes, I noticed that, but it is a typo. In the original source the second variable is wd_amount. :) Thanks anyway :) On Oct 16, 8:02 am, Bert Van den Brande wrote: > Don't know if it helps but you map two sums to the same column alias > 'amount' , I think you should make them unique ... > > > > O

Re: Help - Can't write the SQL query in CakePHP style

2009-10-16 Thread matija
Hi! I'm quite a n00b with cakephp and was going nuts with similar problem a couple of days ago. This page helped me out: http://mark-story.com/posts/view/using-bindmodel-to-get-to-deep-relations Best, Matija I was going nuts with a similar problem a few days a go.. On Oct 15, 3:13 pm, logout

Re: Help - Can't write the SQL query in CakePHP style

2009-10-16 Thread Dr. Loboto
Not any helpful reply, but... your query will work with "Invoice hasOne Writedown". And you can try Containable behavior: http://book.cakephp.org/view/474/Containable On Oct 15, 8:13 pm, logout wrote: > Guys, > > I have a problem. I tried to write one SQL query useing the CakePHP > style, but I

Re: Help - Can't write the SQL query in CakePHP style

2009-10-15 Thread Bert Van den Brande
Don't know if it helps but you map two sums to the same column alias 'amount' , I think you should make them unique ... On Thu, Oct 15, 2009 at 3:13 PM, logout wrote: > > Guys, > > I have a problem. I tried to write one SQL query useing the CakePHP > style, but I failed. Can someone help? > > He