fouls; } public function setFouls($val) { $this->fouls = $val; } public function getScore() { return $this->score; } public function setScore($val) { $this->score = $val; } public function getResult() { return $this->getScore()." punkti"; } public function save() { global $kdb; $aid = $this->getAnswerID(); parent::save(); if ( $aid == null ) { $sql = "INSERT INTO ".$this->table." (answerID, score, fouls) values(".$this->getAnswerID().", '".$this->getScore()."', '".$this->getFouls()."')"; $kdb->query($sql); } else { // update answer - not in this version of Krihvel } } } ?>