assoc_array("select * from milestone_competition where msc_id = " . $_msc_id); $cat_array = $cat_assoc_array[0]; //alapadatok foreach ($cat_array as $field => $value) { $function_name = "set_" . $field; $this->$function_name($value); } } public static function create_msc($_date, $_name, $_category, $_location, $_place, $_month, $_matches = NULL) { global $sql; return $sql->insert_into('milestone_competition', array( 'msc_date' => $_date, 'msc_name' => $_name, 'msc_category' => $_category, 'msc_location' => $_location, 'msc_place' => $_place, 'msc_month' => $_month, 'msc_matches' => $_matches, )); } /** * @return mixed */ public function get_msc_id() { return $this->msc_id; } /** * @param mixed $msc_id * * @return self */ public function set_msc_id($msc_id) { $this->msc_id = $msc_id; return $this; } /** * @return mixed */ public function get_msc_date() { return $this->msc_date; } /** * @param mixed $msc_date * * @return self */ public function set_msc_date($msc_date) { $this->msc_date = $msc_date; return $this; } /** * @return mixed */ public function get_msc_name() { return $this->msc_name; } /** * @param mixed $msc_name * * @return self */ public function set_msc_name($msc_name) { $this->msc_name = $msc_name; return $this; } /** * @return mixed */ public function get_msc_category() { return $this->msc_category; } /** * @param mixed $msc_category * * @return self */ public function set_msc_category($msc_category) { $this->msc_category = $msc_category; return $this; } /** * @return mixed */ public function get_msc_place() { return $this->msc_place; } /** * @param mixed $msc_place * * @return self */ public function set_msc_place($msc_place) { $this->msc_place = $msc_place; return $this; } /** * @return mixed */ public function get_msc_matches() { return $this->msc_matches; } /** * @param mixed $msc_matches * * @return self */ public function set_msc_matches($msc_matches) { $this->msc_matches = $msc_matches; return $this; } /** * @return mixed */ public function get_msc_month() { return $this->msc_month; } /** * @param mixed $msc_month * * @return self */ public function set_msc_month($msc_month) { $this->msc_month = $msc_month; return $this; } /** * @return mixed */ public function get_msc_location() { return $this->msc_location; } /** * @param mixed $msc_location * * @return self */ public function set_msc_location($msc_location) { $this->msc_location = $msc_location; return $this; } } ?>