Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

amen08's avatar

invalid sql request

Can i get a help to translate this request there is a fault but I do not know or exactly I want to show the participants of the event I created ..I have 3 tables table users, event and user_event

  $verif=DB::table('users')
            ->join('user_events', function($join)
            {
                $join->on('users.id', '=', 'user_events.user_id')
                    ->where('user_events.event_id', '=','(SELECT users.id FROM users , events WHERE users.id = events.admin)');
            })
            ->get();
0 likes
1 reply
Snapey's avatar

you might find eloquent easier to get started with

Please or to participate in this conversation.