Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Using $this when not in object context
#1

[eluser]Dileep[/eluser]
I have a model class that looks likes the following

Code:
function block_user()
{

  function is_in_blocked_list()
   {
     //line number 137...

   }
  function power_block()
  {
    is_in_blocked_list()  // doing some operations


  }

if (condition)
{
power_block();
}

}

But i am getting an error on is_in_blocked_list()

that is

Using $this when not in object context in C:\wamp\www\pname\application\models\admin\admin_user.php on line 137

Line 137 says that

Code:
$qry = "SELECT a FROM tblC WHERE username=?";
            $qry = $this->db->query($qry,array($userName));

i am new to php and codeigniter,how can i fix this problem ?

Thank you .




Theme © iAndrew 2016 - Forum software by © MyBB