What you're looking for is $uses.
http://book.cakephp.org/view/53/components-helpers-and-uses

Or alternatively:
App::import('Model', 'OtherModel');
$othermodel = new OtherModel();

On 11 Oct 2008, at 09:56, Wayne wrote:

>
> This might be a simple question, but everything I'm trying is not
> working and it's frustrating the hell out of me.
>
> I need to do a find() on a model that is not related to the model
> whose controller I'm currently accessing. I know how to make this work
> if there's a hasMany or belongsTo sort of relationship between the two
> models, but in this case, there's not. I've tried creating new
> instances of the other controller to query, and I've tried to use the
> static find() method, but neither is working because the model I'm
> working with doesn't have any knowledge of the existence of the other
> model. It seems to me there should be some simple way to do this, but
> I can't find any example of this sort of query in the documentation. I
> realize that I can use query() to hit the database directly, but I was
> trying to avoid that, and it seems like CakePHP should be able to find
> the other model if I could just ask it in the right way.
>
> Is there some way normal "CakePHP" to do this?
>
> Thanks for any help you can provide,
> Wayne Eaker.
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to