I have 2 tables User and User2. In my User model, how do I refer to a column
in User2? thanks

for example, if i have User and User2, and i want to refer to User2 in User
model:

<?php
class User extends AppModel
{
    var $name = 'User';

    function validateLogin($data)
    {
        $user = $this->find(array('username' => $data['username'],
'password' => md5($data['password'])), array('id', 'username'));
        if(empty($user) == false)
            return $user['User'];
        return false;
    }

}
?>

...

<?php
class User2 extends AppModel
.....
?>

--~--~---------~--~----~------------~-------~--~----~
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