public function admin_manage($business_id){// echo $business_id; controller::loadModel('Business'); if($business_id != ''){ $this->Business->recursive = -1; $businessCount = $this->Business->find('count', array('conditions'=>array('Business.id'=>$business_id))); if($businessCount > 0){ //echo 'test';die; $this->BusinessOffer->recursive = -1; $this->paginate = array('conditions'=>array('BusinessOffer.business_id'=>$business_id), 'limit'=>PAGING_SIZE, 'order'=>array('BusinessOffer.id'=>'DESC')); $this->set('viewListing', $this->paginate('BusinessOffer')); }else $this->redirect('/admin/businesses/manage/'); }else $this->redirect('/admin/businesses/manage/'); }