I would like to select some of the columns that are related to the user table in my database.
I have the following script set up in my model:
$user = Users::find(array(
"email = :email:",
'bind' => array('email' => $user_email)
));
According to this forum post you can add the 'columns' attribute in the function to get specified columns. How do I select the columns from related tables? Because the following snippet doesn't work:
$user = Users::find(array(
"email = :email:",
'bind' => array('email' => $user_email),
'columns' => 'othertable.columnname'
));
I know it is possible with PHQL but I really like the way it could be done without it by just using the "Find" function. Is it even possible without using PHQL?