-1
I’m playing with Aravel and I’m learning object orientation and I wanted to make a select without using the Join as and object oriented and I know little n I’m getting.
as I’m used to using:
$results = DB::select("SELECT u.foto, u.Ninck,o.Idsala,p.Aceitou, u.Id FROM Onsalas o , Usuarios u, Partidas p WHERE (o.Idusuario=u.Id) AND (u.Id != $Id) AND(o.Idsala = $sala) AND ((p.IdDesafiado = $Idop) OR (p.IdDesafiante = $Idop)) ");
I tried to make ways but all failed
some ways I tried:
$results = DB::table(' \'Onsalas\' , \'Usuarios\' ')
->select('Onsala.Id')->get();
$results = DB::table('Onsalas' , 'Usuarios')
->select('Onsala.Id')->get();
$results = DB::table('Onsalas')->table( 'Usuarios')
->select('Onsala.Id')->get();
ai u used Join was wanting to do without using Join
– Cyber Hacker