Welcome Guest, Not a member yet? Register   Sign In
Unusual ActiveRecord Result
#3

[eluser]E303[/eluser]
Thanks that worked.

A quick question. you mentioned that it wouldn't work with a foreach yet this code does work.
Code:
$url = $this->uri->segment(3);
            $this->db->select('artistId');
            $this->db->from('exhibitions');
            $this->db->where('url', $url);
            $artist_list = $this->db->get();
            
            foreach ($artist_list->row() as $row)
            {
                $this->db->select('firstName, lastName, url');
                $this->db->from('artists');
                $this->db->where('artistId', $row['artistId']);
                $artistExhibition_data = $this->db->get();
                return $artistExhibition_data->result_array();
            }


Messages In This Thread
Unusual ActiveRecord Result - by El Forum - 07-01-2008, 12:06 AM
Unusual ActiveRecord Result - by El Forum - 07-01-2008, 12:45 AM
Unusual ActiveRecord Result - by El Forum - 07-01-2008, 01:11 AM
Unusual ActiveRecord Result - by El Forum - 07-01-2008, 01:19 AM
Unusual ActiveRecord Result - by El Forum - 07-01-2008, 01:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB