You can add column display the data generated by object method,
for example a method of your model.
public static function getRoleName($userId)
{
$sql = "select role.RM_NAME from XXX role
where role.RM_ID=(select qqq from ZZZ where XXX=".$userId.")";
$command = Yii::app()->db->createCommand($sql)->queryAll();
$roleName = $command[0]['RM_NAME'];
return $roleName;
}
This is something irreverent thing you have posted here.i dont thing anything is useful in this post.It’s just like a self practice.Which is also in a wrong direction.