Welcome Guest, Not a member yet? Register   Sign In
DB/Query Error
#1

[eluser]Shujin[/eluser]
Code:
function is_staff()
    {
        $id = $this->ci->session->userdata('userid');
        $query = $this->ci->db->get_where('group_memberships', array('userid' => $id));
        $group = $query->row()->groupid;
        
        if ($group <= 2) {
            return true;
        }
    }

Which seems to give me this error:

Quote:A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: libraries/quickauth.php

Line Number: 184

But I have the exact same code right above (at Line: 173)
but it only detects the error at this line.


Messages In This Thread
DB/Query Error - by El Forum - 08-31-2010, 05:46 AM
DB/Query Error - by El Forum - 08-31-2010, 06:15 AM
DB/Query Error - by El Forum - 08-31-2010, 06:18 AM
DB/Query Error - by El Forum - 08-31-2010, 07:32 AM
DB/Query Error - by El Forum - 08-31-2010, 07:49 AM
DB/Query Error - by El Forum - 08-31-2010, 07:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB