PHP: How to update a variable of a parent class from a child class

Grorrulsego

New Member
I have a function in a child class which counts the number of SQL queries in a page load In the child class which extends the parent class, after every: \[code\]mysql_query($query);\[/code\]I put \[code\]parent::update_query_function();\[/code\]where \[code\]update_query_function()\[/code\] is:\[code\]function update_query_function(){$this->query_num++;}\[/code\]the \[code\]$query_num\[/code\] variable in the parent class is not being updated. Why?
 
Back
Top