k thanks…i used like this and it works…$vaca=vacationsta::model()->with(array('app'=>array('condition'=>'??.approvalrequired="'.$approvalrequired.'"','joinType'=>'INNER JOIN')))->findAll($criteria);
$pages=new CPagination($a);
if($p>=0)
{
$pages->setCurrentPage($p);
}
if($pa<=0)
{
$pages->pageSize=10;
}
else
{
$pages->pageSize=$pa;
}
$pages->applyLimit($criteria);
and this line $pages->applyLimit($criteria); cannot apply the offset and limit values to to the pagination .....if i give $vaca instead of $criteria i get error ..now the problem i have checked and got the answers which i need but i was unable to provide pagination all results are displayed ina single page..........and all pages displays all records