function get_photos() $result = DB::select("photos.id","photos.caption") ->from('photos') ->where('photos.user_id', $this->user_id) ->as_object() ->execute(); return $result; }
$data['photos'] = $user->get_photos(); $this->template->content = View::factory('profile', $data);
A Huzz wrote on Thursday 18th of August 2011:Have a look at this thread http://fuelphp.com/forums/topics/view/3901
function get_photos(){ $result = DB::select("photos.id","photos.caption") ->from('photos') ->where('photos.user_id', $this->user_id) ->execute(); return $result->as_array(); }That will work. This feels like more of a work around, I still don't get why an array of stdClass objects should throw that exception.
It looks like you're new here. If you want to get involved, click one of these buttons!