Hi guys, I have a “user” table in which a user has as another user as boss, so I’m having a relation with the same table
User
id_user = 1
name = Jhon Boss
boss = null
id_user = 2
name = Peter Smith
boss = 1 <- This is the id of Jhon Boss
So when I create a CGridView I need to display within the boss column the name of the boss instead of the id, if it isn’t null.
'columns'=>array(
'id_user',
'name',
'boss' // Here is where I need to display name instead of id
Thanks in advance!