assoc_array("select * from milestone_season where mss_id = " . $_mss_id); $mss_array = $mss_assoc_array[0]; //alapadatok foreach ($mss_array as $field => $value) { $function_name = "set_" . $field; $this->$function_name($value); } } public static function create_mss($_text) { global $sql; return $sql->insert_into('milestone_season', array( 'mss_text' => $_text, )); } /** * @return mixed */ public function get_mss_id() { return $this->mss_id; } /** * @param mixed $mss_id * * @return self */ public function set_mss_id($mss_id) { $this->mss_id = $mss_id; return $this; } /** * @return mixed */ public function get_mss_text() { return $this->mss_text; } /** * @param mixed $mss_text * * @return self */ public function set_mss_text($mss_text) { $this->mss_text = $mss_text; return $this; } } ?>