vrana/notorm

Join Question

Opened this issue · 0 comments

OK, so I have a database that has an addresses table that contains rows of addresses that tie back to clients using clients_id BUT each client can have 3 addresses... so i used 3 columns. main_address, shipping_address, billing_address so how would one go about righting a notorm qurey like this one..

$results = $db->clients()->join(addresses ON clients.main_address = addresses.id)

$row->addresses['main_address']['street']
OR
$row->main_address['street']

i know PDO can do this, but i was wondering if Notorm can do this?