registry &= $reg; #Load info if ($this->validate($id)) { $this->questioninfo = $this.load(); } else { exit('Not a valid question id. Please contact your Administrator'); } } private function validate($id) { if ($this->registry == null) { exit('Internal Error: Registry object not set'); } $validate = $this->registry->db->query_read("SELECT questionid As article WHERE threadid = $id"); if($validate) { $this->id = $id; return true; } else { return false; } } } #Should only be called after validate()! public function load() { $this->questioninfo = $this->registry->db->query_read("SELECT * from kb_articles WHERE threadid = " . $this->id ."); } }