Support the ongoing development of Laravel.io →
Database Eloquent Laravel.io
Last updated 2 years ago.
0

I do it like this

A::join(B,"A.ID",'=',"A.ID")

Hope this help :)

Last updated 8 years ago.
0

Hi @riturajraina, try it:

$query = DB::table('matchscore_profile_data AS a');

    $query
        ->join('matchscore_segment_relevance as asr', 'asr.segment_name', '=', 'a.segment')
        ->join('matchscore_segment_relevance as bsr', 'bsr.segment_name', '=', 'a.segment')
        ->select('matchscore_profile_data.*', 'asr.segment_name as asr_segment_name ', 'bsr.segment_name as bsr_segment_name');

return $query;
Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.