Here’s the parent class:
class Event {
public function getLang($lang){
$sql = "select * from Event where EventID =" . $this->EventID . "AND Lang =" . $lang;
$result = $this->selectOneRow($sql);
}
}
and here’s the child:
class Invitation extends Event{
public function getLang($lang){
Event::getLang($lang);
$sql = "select * from invitation where EventID =" . $this->EventID . " and Lang = " . $lang;
}
}
I had some hope that EVENT::getLang($lang) would work but after I echo the query, I can see that it stops short of an EventID.
Is there a right way to do this?
I tried copy/pasting the code in the child directly but that can’t work either because, I got variables at the parent’s level to which the result of event’s select will be assigned.
Is there any way to work around this or am I in a gridlock?
I think you’re looking to use the
parentkeyword: