milestone fix; maybe not perfect

This commit is contained in:
Tóth Richárd
2019-02-14 16:53:40 +01:00
parent ddd2727ef2
commit 9abbc57532
16 changed files with 1492 additions and 989 deletions

View File

@@ -17,17 +17,17 @@ class milestone_competition
public function set_msc_data_by_id($_msc_id) {
global $sql;
$cat_assoc_array = $sql->assoc_array("select * from milestone_competition where msc_id = " . $_msc_id);
$cat_array = $cat_assoc_array[0];
global $sql;
$cat_assoc_array = $sql->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);
}
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)
public static function create_msc($_date, $_name, $_category, $_location, $_place, $_matches = NULL)
{
global $sql;
return $sql->insert_into('milestone_competition', array(
@@ -36,7 +36,6 @@ class milestone_competition
'msc_category' => $_category,
'msc_location' => $_location,
'msc_place' => $_place,
'msc_month' => $_month,
'msc_matches' => $_matches,
));
}