inner join cakephp 3 with find
$query = $this->Dperusahaan->find('all')
->join([
'subsection' => [
'table' => 'subsection'
'type' => 'inner',
'conditions' => 'users.npwp_pt = dperusahaan.npwp',
],
'city' => [
'table' => 'cities',
'type' => 'INNER',
'conditions' => 'users.city_id = cities.id',
]
])->toArray();
$query = $this->Dperusahaan->find('all')
->join([
'subsection' => [
'table' => 'subsection'
'type' => 'inner',
'conditions' => 'users.npwp_pt = dperusahaan.npwp',
],
'city' => [
'table' => 'cities',
'type' => 'INNER',
'conditions' => 'users.city_id = cities.id',
]
])->toArray();
Tidak ada komentar:
Posting Komentar