Displaying Name Rather Than Ids In Clistview

hii guys I need your help.

i have following join query in my controller

$users = Yii::app()->db->createCommand()


		->from('users u')

		->join('user_prof_details p', 'u.id = p.users_id')

		->join('user_grades_specialty g', 'u.id = g.users_id')

		->join('assignments a', 'u.id = a.userid')

		->where('a.itemname=:nid && u.status=:id && p.pref_location_id=:pid && g.grade_id=:gid && g.specialty_id=:sid',

		 array(':nid'=>'member', ':id'=>5 ,':pid'=>$userprofdetail->pref_location_id,':gid'=>$gsmodel->grade_id,':sid'=>$gsmodel->specialty_id) )



		$dataProvider=new CArrayDataProvider($users);

then I need to display it on clist view

here is my _view code

<h3><?php echo $data['first_name'] . ' ' . $data['last_name']; ?></h3>


        <div class="jobItem-content-title2">

        <?php //echo CHtml::encode( $data->userProfDetails['pref_location_id']); ?> 

        <?php echo  $data['grade_id']; ?>


        <?php echo  $data['specialty_id']; ?>

all are ok bt i need the name of the detail rather than displaying Ids.pls help me

[size=2]hi sldra whatever you put in the _view.php is displayed as is so you have to put whatever you like[/size]

echo "username : " . $data['username'];

echo "grade :" . $data['grade'];