I cannot get my insert function working. I have used this frame work.
https://github.com/ajillion/PHP-MySQLi-Database-Class
The error i get is
Fatal error: Call to a member function insert() on a non-object in /home/hghdigib/public_html/backup/feed/classes/xml_upload.php on line 39
I have stripped lost out to make it easier to follow.
Any help would be much appreciated been scratching my head for a while.
My Global Class File
require_once("classes/database.php");
require_once("classes/xml_upload.php");
$db = new Mysqlidb('localhost', '', '', '');
$dataupload = new DataUpload($db);
$dataupload->getAllProducts($db);
My xml_upload.php class
class DataUpload {
public $db;
public $xml_upload;
function __construct($db) {
$this->db = $db;
}
public function getAllProducts() {
foreach ($propertys as $results)
{
$insertData = array(
'prop_id' => $results['prop_id'],
'lastchanged' => $results['lastchanged'],
'url' => $results['url']
);
if($db->insert('propertie_ids', $insertData)) echo 'success!';
}
}
}