function - CakePHP custom pagination / paginator in controller not working as expected - what am I doing wrong? -
i can find work other way, cannot working pagination. doing wrong?
output in view:
sql error: 1054: unknown column 'fields' in 'where clause' warning (2):** cannot modify header information - headers sent (output started at...
controller action:
... $cond = array( 'fields' => array('id', 'name', 'provider_network_url', 'application_url'), 'conditions' => array('plandetail.id' => $id), 'contain' => array( 'company' => array('fields' => array( 'id', 'name', 'company_logo_url', 'plan_detail_by_company_landing')), 'plan' => array('fields' => array('id', 'monthly_cost'), 'applicant' => array('fields' => array('id', 'name')), 'age' => array('fields' => array('id', 'name')), 'state' => array('fields' => array('id', 'name')), 'zip' => array('fields' => array('id', 'title')), 'plandetail' => array('fields' => array('id', 'name')), ))); $plandetails = $this->paginate('plandetail', $cond); $this->set(compact('plandetails', $plandetails)); ...
$this->paginate = array( 'fields' => ...., 'conditions' => ...., 'contain' => array( 'company' => ..., 'plan' => ....)); $this->set('plandetails', $this->paginate()));
Comments
Post a Comment