select 1 field and loop in index

hey guys…prefer to display 1 column but i can only display 1 row so what my code is looks like this…

class CustomerController extends Controller

{

public $firstname=’’;

public function actionIndex()


{


$firstname=CustomerName::model()->findByPK(2);


$this->firstname=$firstname->firstname;


	$this->render('index',array('firstname'=>$this->firstname));


}

}

its only select by primary key, and 1 row…

so why don’t you use DAO (http://www.yiiframework.com/doc/guide/1.1/en/database.dao)? Nobody forces you to use ActiveRecord in every case…