Welcome Guest, Not a member yet? Register   Sign In
Help with JOIN active record class
#4

[eluser]bluepicaso[/eluser]
It helped great, but i a one to may relationship. Its like for each tour package i have many images.
with the above code, the package gets displayed = number of images of that project.
I have pagination with it too
my model code.
Code:
$this->db->select('*');

        $this->db->from('package');

        $this->db->where('zone', $zone);

        $this->db->join('images', 'images.pak_id = package.pac_id', 'LEFT');  

        $this->db->limit($num, $offset);

        $query = $this->db->get()->result_array();

        foreach($query as $row)

        {

            $data[] = $row;

        }

        return $data;

        $this->db->close();

How do i get this done?
Please help


Messages In This Thread
Help with JOIN active record class - by El Forum - 06-16-2010, 05:14 AM
Help with JOIN active record class - by El Forum - 06-16-2010, 05:36 AM
Help with JOIN active record class - by El Forum - 06-16-2010, 05:48 AM
Help with JOIN active record class - by El Forum - 09-02-2010, 12:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB