Answer the question
In order to leave comments, you need to log in
Is it possible to get the result with a Mysql collection?
Query example:
Mysql query:
SELECT
t1.`ID`,
t1.`title`,
t2.`first_name`,
t2.`last_name`
FROM `posts` AS `t1`
LEFT JOIN `users` AS `t2` ON t1.`ID` = t2.`post_id`;
[0] => {
'ID' => 140,
'title' => 'title one',
'first_name' => 'name',
'last_name' => 'family'
}
...
[0] => {
'ID' => 140,
'title' => 'title one',
'user_data' => {
'first_name' => 'name',
'last_name' => 'family'
}
}
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question