Welcome Guest, Not a member yet? Register   Sign In
non-object
#2

[eluser]Jamie Rumbelow[/eluser]
Hi GamingFusion,

The mistake you've made is in the Model - you're calling $query->result(), which returns an array instead of $query->row(), which returns an object. You could either change this in the model or you could access the first object in the array with the '0' index. I'd change the model, so the model function should look like so:

Code:
function getShow($id)
    {
        //Get Shows Data
        $this->db->where('id', $id);
        $query = $this->db->get('shows');
        
        return $query->row();
    }


Messages In This Thread
non-object - by El Forum - 10-25-2009, 05:53 PM
non-object - by El Forum - 10-25-2009, 05:58 PM
non-object - by El Forum - 10-25-2009, 05:58 PM
non-object - by El Forum - 10-25-2009, 06:06 PM
non-object - by El Forum - 10-25-2009, 07:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB