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

Join not working in Query Builder #464

Closed
nskarl opened this issue Apr 13, 2017 · 2 comments
Closed

Join not working in Query Builder #464

nskarl opened this issue Apr 13, 2017 · 2 comments

Comments

@nskarl
Copy link

nskarl commented Apr 13, 2017

public function get($userid, $key)
{
$db = Database::connect();
$builder = $db->table('users');
$builder->select('users.*');
$builder->join('users_profiles', 'users_profiles.userid = users.id', 'left');
$builder->where('users.id', $userid);
$query = $builder->get()->getRowArray();
if($query) return $query;
return null;
}

Tried all possible options, different aliases and without them - produces the same error:

Call to a member function getRowArray() on boolean

its work only with 1 table

@nskarl
Copy link
Author

nskarl commented Apr 13, 2017

sorry. all is work.
dont work only with aliases

can i use aliase like as join ('users_profiles up', 'up.userid = u.id', 'left') ?

@jim-parry
Copy link
Contributor

We use github for bug tracking, not support. You should post a thread on our forum instead.

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

2 participants