Welcome Guest, Not a member yet? Register   Sign In
Better practice to do this?
#2

[eluser]Lockzi[/eluser]
The bad news... 40 views and 0 replies...

The good news... I've sorted it out, at least partially.

What I did was change the controller code

Code:
$this->doForum['rawTopics'] = $this->f->getTopics($this->uri->segment_array());
        $this->doForum['rawTopics2'] = $this->doForum['rawTopics'];
        
        foreach ($this->doForum['rawTopics2']->result_array() as $topic) {
            $this->forum['topics'][$topic['id']] = $topic;
            $this->forum['topics'][$topic['id']]['last_post_by_userName']    = $this->user->idToName($topic['last_post_by'])->row_array();
            $this->forum['topics'][$topic['id']]['started_by_userName']    = $this->user->idToName($topic['started_by'])->row_array();
        }
        
        //Get subcategory as well
        $this->forum['subcategory'] = $this->doForum['rawTopics']->row();

Works like a charm, except that I would like it to be object instead of array... Except I have absolutly no idea at all on how to do that. All these problems makes me feel like a noob all over again haha.

Regards,
Lockzi


Messages In This Thread
Better practice to do this? - by El Forum - 10-27-2007, 08:32 AM
Better practice to do this? - by El Forum - 10-27-2007, 04:46 PM
Better practice to do this? - by El Forum - 10-27-2007, 07:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB