8 months ago

Retrieving information from 3 tables

Posted 8 months ago by Chris1981

I'm trying to get information from 3 tables in Laravel 5.8 but so far i have just come up with nothing.

The 3 tables look something similar to the following;

    id - integer
    name - string
    status - tinyint

    id - integer
    poll_id - integer
    image_id - integer
    status - tinyint

    id - integer
    filename - varchar

A poll has several poll options, those poll options have 1 images each.

I would like to get poll options with the poll status of 1 and any images that have poll options with a status of 1

I need the get the filename, the poll option id and the poll id.

I'm so confused

Any help would be greatly appreciated.

Please sign in or create an account to participate in this conversation.