// create customers object $client = new client(); // client can have more then one address so create that object too $contract = new contract(); // inner join the two tables on primary key and customerid $client->inner_join($contract, 'id', 'client_id'); //left right and join are also possible // get the result of the qeury $this->view->client = $client->fetch_all(['limit'=>1])[0];
You loose all Activerecord functionality. Result is returned as \stdClass object
stdClass Object
(
[id] => 1
[initialen] => A.B.
[achternaam] => Test
[product] => Barebone Studio
[orderdate] => 2026-08-22 10:33:19
[begindate] => 2026-08-22 10:33:19
[enddate] =>
[client_id] => 6
)