dimanche 31 mai 2020

sql pv: query in laravel

I want to write the laravel query for working sql below query.below query executed correctly in sql how to the above query in laravel for postgresql db

select  id,
        user_name,
        reported_to 
from    (select * from user_master
         order by reported_to) orrdered,
        (select @pv := 'prathap Achuthan') initialisation
where   find_in_set(reported_to, @pv)
and     length(@pv := concat(@pv, ',', user_name))


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire