try; } public function setTry($val) { $this->try = $val; } public function getTime() { return $this->time; } public function setTime($val) { $this->time = $val; } public function getPoints() { return $this->points; } public function setPoints($val) { $this->points = $val; } public function getResult() { return $this->getPoints()." punkti"; } public function save() { global $kdb; $aid = $this->getAnswerID(); parent::save(); if ( $aid == null ) { $sql = "INSERT INTO ".$this->table." (answerID, try, time, points) values(".$this->getAnswerID().", '".$this->getTry()."', '".$this->getTime()."', '".$this->getPoints()."')"; $kdb->query($sql); } else { // update answer - not in this version of Krihvel } } } ?>