• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.