Hello all, iam trying to understand the code ( follow the workflow is a nightmare for me)
I need to make some mods, in order to make it clean, i need to understand the code ( mission failed at the moment)
quick question, what mean $id here?
class Priority {
var $id;
var $ht;
function Priority($id){
$this->id =0;
$this->load($id);
}
function load($id) {
if(!$id && !($id=$this->getId()))
return false;
$sql='SELECT * FROM '.PRIORITY_TABLE
.' WHERE priority_id='.db_input($id);
if(!($res=db_query($sql)) || !db_num_rows($res))
return false;
$this->ht= db_fetch_array($res);
$this->id= $this->ht;
return true;;
}
function getId() {
return $this->id;
}
look like a circle for me :/