Yii Framework Forum: Getting Value From Tables Having Foreign Key In Yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Getting Value From Tables Having Foreign Key In Yii Rate Topic: -----

#1 User is offline   Afnan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 36
  • Joined: 18-October 11

Posted 27 March 2013 - 08:02 AM

I have three tables in the db. One is 'authmanager' has 'rolename' and 'user_id'. The second is 'user' which has the usual 'id', 'username' and 'password'. The third table is 'employee', which has 'id', 'user_id' and the rest of the fields. The problem is that in the index page of employee i want to show the employees in tabs and according to the roles in the 'authmanager' table. How can the relations of yii be used?

I am using rights for managing rights and authasignments. In authitem there are entries for different roles. I want to get all the users belonging specific 'rolename'. So far i get exisitng roles with the help of "Rights::getAssignedRoles()". I am new to rights so please give me a direction to work.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users