Support the ongoing development of Laravel.io →
posted 10 years ago
Eloquent

Hi

sorry but how can i combine a whereIn, join and an update like :

$query = DB::table('tableA');

$query->update(array('tableA.amount' => 94)) ->whereIn('tableA.id', DB::table('tableA')->join("accounts", function($join){ $join->on("accounts.id",'=','tableA.account_id'); })->join("users", function($join) { $join->on("users.id",'=','accounts.user_id') ->where("users.xy_id",'=',$this->option()); })->skip(0)->take(100)->get(['tableA.id']));

I get the following error

Call to a member function whereIn() on a non-object

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.