$this->paginate = array('joins' => array(
array('table' => 'users', 'alias' => 'User', 'type' => 'INNER', 'conditions' => array(
'Tracer.nimhsmsmh=User.username'))),
'conditions' => array('User.tracer_tahun' => $event, 'User.jurusan' => $jur, 'OR' => array('Tracer.nimhsmsmh like ' => "%$cari%", 'User.nama like' => "%$cari%", 'User.jurusan like' => "%$cari%", 'Tracer.saran like' => "%$cari%", 'Tracer.masukan like' => "%$cari%")), 'fields' => array('Tracer.*', 'User.*'),
'limit' => $cfilter, 'order' => 'Tracer.id asc');
$tracers = $this->paginate('Tracer');
$this->set(compact('tracers', 'cari', 'cfilter', 'tahun', 'sms', 'jur'));
query join cakephp custom with pagination no model
Selasa, 03 Oktober 2017
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar