On Mon, Mar 10, 2008 at 1:07 AM, bob <[EMAIL PROTECTED]> wrote:
> I have 2 tables User and User2. In my User model, how do I refer to a column
> in User2? thanks
>

Well, there are two ways this can work

1) if there is an established relationship between those tables (i.e.
you've created an association) you *should* be able to get a field
from User2 by doing $this->User2->find(...).  Please verify that as
I'm not in front of any CakePHP code at the moment
2) You can always do App::import('Model', 'User2) inside of User, and
then create an instance of User2

App::import('Model', 'User2');
$user2 = new User2();

I'm sure others will correct me if I'm wrong.

Hope that helps.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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