Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How use left join in foreach? #122

Open
misterkonst opened this issue May 14, 2021 · 0 comments
Open

How use left join in foreach? #122

misterkonst opened this issue May 14, 2021 · 0 comments

Comments

@misterkonst
Copy link

foreach ($model_params as $join_key => $join_value) {
            if ($join_value->relationship !== null) {
                $query->leftJoin(
                    $join_value->relationship,
                    $join_key,
                    $join_value->foreign_key,
                );
            }
        }

Hi, how u can see I use left join in foreach, but in sql code have only one join, what am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant