hi
i have a class with a function in it. but when i try to call the function php gives an error that it would be an call to an undefined function.
i call the same classfunction from another class function and it works fine.
here is my error msg:
Fatal error: Call to undefined function: dbquery() in catlib.php on line 66
the class looks like this:
class DB {
function dbQuery($query) {
// make a db query
$result = mysql_query($query);
$this->dbReport();
return $result;
}
}
the calling code like this:
class Category {
function listCats($catID) {
// Select sub-categories from DB
$dbCat = new DB();
$query = "SELECT * FROM lc_cat WHERE catPathID LIKE \"%:$catID\"";
$result = $dbCat->dbQuery($query);
//$result = mysql_query($query);
// returning the MySQL query result.
return $result;
}
}
and the page calling the whole thing:
$cat = new Category();
$catResult = $cat->listCats($catID);