well... I didn't expect any answer... but to close the issue... I think there is a bug somewhere here (maybe in wherenotexists )
I changed the query to something equivalent to make it work
return DB::table('contact_emails')
->join('user_contacts', 'contact_emails.contact_id', '=', 'user_contacts.contact_id')
->where('user_contacts.user_id','=',1)
->whereNotIn('contact_emails.contact_id',function($query)
{
$query->select('event_contacts.contact_id')
->from('event_contacts')
->where('event_contacts.event_id','=',17);
})
->get();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community