Welcome Guest, Not a member yet? Register   Sign In
fatal error:Call to a member function query()
#1

[eluser]praveenarya[/eluser]
hi all,
iam new to ci iam developing a site in ci i got this error.my code is
Code:
if($_SERVER['REQUEST_METHOD']=="POST")
    {
        $ssss="select * from ab_admin where ad_uname='".$_POST['log_id']."' and ad_pass='".$_POST['log_pswd']."' and ad_status=1";
    $query=$this->db->query($ssss);
    
if ($this->db->num_rows() > 0)
{

foreach ($this->db->result_array() as $row)
{
.........//do something
}
}
}
but i got error
Fatal error: Call to a member function query() on a non-object in D:\wamp\www\example\system\application\controllers\admin\welcome.php on line 17
can anyone help me
thanks in advance


Messages In This Thread
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:30 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:33 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:43 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:53 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:55 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 10:43 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 09:42 PM
fatal error:Call to a member function query() - by El Forum - 08-31-2009, 08:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB