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

PaulCatalin97's avatar

inner join 3 tables phpmyadmin

i have a table special for id_profile and id_job

i want to insert the id for job that one id profile have selected.

table job_to_profile

protected $fillable = [
        'id', 'id_profile', 'id_job',
    ];

table joburi

protected $fillable = [
        'id', 'titlu', 'descriere', 'salariu_estimativ', 'oras', 'id_skill', 'activ',
    ];

table profileemployee

protected $fillable = [
        'id', 'uid', 'first_name', 'last_name','phone', 'cv', 'image', 'address', 'city',
    ];

how can i do that with inner join ?

0 likes
1 reply
munazzil's avatar

You can try something like below,

$Profiles = DB::table('job_to_profile')
->join('joburi', 'joburi.id', '=', 'job_to_profile.id')
->join('profileemployee', 'profileemployee.id', '=', 'joburi.id')
->get()

Please or to participate in this conversation.