Hi, I've searched the group topics but didnt find anything useful to help me. So here's the problem:
I have 3 tables: - users - groups - groups_users (HABTM) I have a login screen where the user types username and password In this line of code, I am searching the 'users' table with the entered username. $user = $this->User->findByUsername($this->data['User']['username']); That returns the the user information from the table just fine. To get the user id i used : $user['User']['id'] Now I want to use this id to access the 'groups_users' and get the group_id, then access the 'groups' table and fetch the group information for the id. Any ideas how I can do that? N.B. I have 2 models 'User' and 'Group' connected to the controller. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
