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?

Can't you use image_name as the src for an img tag?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.