Skip to content

Join Question #135

@alandoyle95

Description

@alandoyle95

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions