Actually, thats wrong. This is a better way to do it.
class user_class extends database_class {
function user_method() {
$this->database_class_function(...)
}
}
Daarius wrote:
inside the same method where you call the query. else have a class attribute, and create the instance of the db class in the constructor. e.g.
function Constructor() {
$this->db = new database();
}
// then in the method
function method() {
$this->query("blah");
}