Skip to content

Join not working in Query Builder #464

Description

@nskarl

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions