correct; } public function setCorrect($val) { $this->correct = $val; } public function getWrong() { return $this->wrong; } public function setWrong($val) { $this->wrong = $val; } public function getMissed() { return $this->missed; } public function setMissed($val) { $this->missed = $val; } public function getPercent() { return $this->percent; } public function setPercent($val) { $this->percent = $val; } public function getResult() { return $this->getPercent()."%"; } public function save() { global $kdb; $aid = $this->getAnswerID(); parent::save(); if ( $aid == null ) { $sql = "INSERT INTO ".$this->table." (answerID, correct, wrong, missed, percent) values(".$this->getAnswerID().", '".$this->getCorrect()."', '".$this->getWrong()."', '".$this->getMissed()."', '".$this->getPercent()."')"; $kdb->query($sql); } else { // update answer - not in this version of Krihvel } } } ?>