public function getrequestCountbyStudy()
{
return $this->CountBySql('select itemid from tbl_archivelog left join tbl_study on study_coordinator='.Yii::app()->user->id.' left join tbl_item on studyid
where tbl_item.studyid=tbl_study.study_id and tbl_archivelog.itemid = tbl_item.item_id and requeststatus=1',itemid);
}
It does not seem to return the correct values kindly help identify the problem.