Error trying to use query builder (version 4.04) |
I'm receiving this error:
When I try to use the "orWhereIn" method of the query builder like so: $results = $this->select('id, body, timestamp, user_id') ->where('user_id', $userID) ->orWhereIn('id', function(BaseBuilder $subq) { return $subq->select('followed_id') ->from('followers') ->where('follower_id', $userID); }) ->orderBy('timestamp', 'DESC') ->findAll(); The "$this" above is in context with the model I am in, so I am using the built-in query builder instance of the model. I have the initial table set up by a "protected $table" declaration (thus no from clause under the first select). Not sure how to fix it - can anyone help? |
Messages In This Thread |
Error trying to use query builder (version 4.04) - by mongoose1130 - 07-23-2020, 12:44 PM
RE: Error trying to use query builder (version 4.04) - by InsiteFX - 07-24-2020, 03:39 AM
RE: Error trying to use query builder (version 4.04) - by mongoose1130 - 07-24-2020, 05:49 AM
RE: Error trying to use query builder (version 4.04) - by InsiteFX - 07-24-2020, 10:03 AM
RE: Error trying to use query builder (version 4.04) - by Gary - 09-01-2020, 11:58 AM
RE: Error trying to use query builder (version 4.04) - by paulbalandan - 09-01-2020, 01:44 PM
|