milestone fix; maybe not perfect
This commit is contained in:
@@ -13,23 +13,22 @@ class milestone_training
|
||||
|
||||
|
||||
public function set_mst_data_by_id($_mst_id) {
|
||||
global $sql;
|
||||
$cat_assoc_array = $sql->assoc_array("select * from milestone_training where mst_id = " . $_mst_id);
|
||||
$cat_array = $cat_assoc_array[0];
|
||||
global $sql;
|
||||
$cat_assoc_array = $sql->assoc_array("select * from milestone_training where mst_id = " . $_mst_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_mst($_date, $_count, $_month, $_trainings = NULL)
|
||||
public static function create_mst($_date, $_count, $_trainings = NULL)
|
||||
{
|
||||
global $sql;
|
||||
return $sql->insert_into('milestone_training', array(
|
||||
'mst_date' => $_date,
|
||||
'mst_count' => $_count,
|
||||
'mst_month' => $_month,
|
||||
'mst_trainings' => $_trainings,
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user