0

Hi I have two tables property and property_images I join these tables with the following query:

    function get_residential(){
        $query = $this->db->query("SELECT
                    property.ID,
                    property.property_name,
                    property.property_slug,
                    property.property_size,
                    property.property_beds,
                    property.property_bath,
                    property.property_garage,
                    property.property_type,
                    property.property_state,
                    property.property_price,
                    property.property_address,
                    property.property_description,
                    property.date_created,
                    property.active,
                    property_image.image_name
                    FROM
                    property AS property
                    INNER JOIN property_images AS property_image ON property.ID = property_image.image_id
                    WHERE property.property_type = 'Residential'
                    GROUP BY property.ID
                    ORDER BY property.ID");
        return $query->result('array');
    }

At the moment i am able to output all the property_description information but not the images, how would i go about outputing the images related to the property in the same view?

2
Contributors
2
Replies
26
Views
2 Years
Discussion Span
Last Post by Ventech_IT
0

@pritaeas yes but it only outputs one image I need it to output all my images associated with the property in the view?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.