Call to a member function query_db() on a non-object?
Posted: Mon Dec 21, 2009 12:39 pm
Hi,
Im getting the error Call to a member function query_db() on a non-object on the following line of code.
From function:
The code from the class is:
I cant work out why, cant any one give me some advice?
Im getting the error Call to a member function query_db() on a non-object on the following line of code.
Code: Select all
$db->query_db($q);Code: Select all
function e_Check($e) {
$q = "SELECT email FROM users WHERE email='$e'";
$db->query_db($q);
return ($db->q_rows($db->q_result) < 1);
}Code: Select all
// Query database
function query_db($query_string) {
$this->q_result = mysql_query($query_string);
}