I want to show the year list without 0, I got 2 yearlist which is 2016 and 2017 in table called invoice_template, so I should get yearlist for 2016 and 2017. May I know any idea to solve this issue? Below is the code and image:
public function getYear(){
$year = Yii::app()->user->getState('start_year');
$queryString = "select distinct year from invoice_template where year =:year ORDER BY year ASC";
$params[':year'] = $year;
$command = Yii::app()->db->createCommand($queryString);
$command->params = $params;
$yearList = $command->queryAll();
return $yearList;
}