I am having problems updating a script that worked in 4.1 to 4.3.
I have two objects, a database object and a item object. The item object needs to use the db object. Before I was passing the db object into the item object. Below is very basic code
Code: Select all
$db = new DB();
$item = new itemObject($db);
$item->doDB();
class itemObject {
function __constructor($db){
$this->db = $db;
}
function doDB(){
$this->db-query("Select * from db");
}
}