command problem

I have this code that does not return any records but when I change the :link with 201001 for example the records are here, what is wrong?


 $sql="select CODE,NAME from ind_categories where LENGTH(KODIKOS)=6 and 

 KODIKOS  like ':link' order by short_id";

 $command=Yii::app()->db->createCommand($sql);$cc=$_GET['cat'];

$command->bindValue(":link",$cc,PDO::PARAM_STR);

 $dataReader=$command->query();

$rows=$dataReader->readAll();;

I found the error.


$sql="select CODE,NAME from ind_categories 

where LENGTH(KODIKOS)=6 and  KODIKOS like :link order by short_id";

         $command=Yii::app()->db->createCommand($sql);

        $dataReader=$command->query(array(':link'=>$_GET['cat']."%"));

        $rows=$dataReader->readAll();

        $dataReader=$command->query();

        $rows=$dataReader->readAll();;