I know the query, but how I convert it to Cakephp mode?

here is my query :
SELECT aros_acos.*, acos.alias, acos.parent_id as PID,
                (SELECT acos.alias
                        FROM acos
                        WHERE acos.id=PID) as parentalias
FROM aros_acos, acos
WHERE aros_acos.aco_id=acos.id

I know I could use 'query' but I want to know if there's a 'cake-mode'
of the query. Thank you..

On 3/22/11, thom <[email protected]> wrote:
> I  am trying to display aros_acos table. But, I am stucked at how to
> get parent's alias from acos. I could display alias from current acos,
> but unable to display the parent. Can anyone help me? I added var
> $belongsTo to my model, so that the data from another table could be
> displayed.
>
>
>
> --
> Regards,,,
> mastanto
> http://www.mastanto.com
> http://thom-sharing.blogspot.com
>


-- 
Regards,,,
mastanto
http://www.mastanto.com
http://thom-sharing.blogspot.com

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to