Hi,
I'm having this problem with parent/child relationship with my classes:
And heres the products.class.php
What this does at the moment, when I update a book, it updates the book table fine but does not update the products table and I wouldve thought it should because of this line:
parent::update_product($fk_productid, $details);
in the update_book function.
Any ideas?
Thanks.
I'm having this problem with parent/child relationship with my classes:
Code:
require_once("classes/products.class.php");
class books extends products {
var $dblink;
function books($dblink) {
$this->dblink = $dblink;
parent::products($this->dblink);
}
function update_book($fk_productid, $bookid, $details) {
parent::update_product($fk_productid, $details);
$this->update_tuple($details, $bookid);
return(1);
}
}
And heres the products.class.php
Code:
class products {
var $dblink;
function products($dblink) {
$this->dblink = $dblink;
}
function update_product($productid, $details) {
$this->update_tuple($details, $productid);
return(1);
}
}
What this does at the moment, when I update a book, it updates the book table fine but does not update the products table and I wouldve thought it should because of this line:
parent::update_product($fk_productid, $details);
in the update_book function.
Any ideas?
Thanks.