Ich denke eher, dass in Check gar nichts drin steht.
Nur wieso frag ich mich.Ich frage mich auch, warum Du das denkst statt es zu wissen.
Ich hab des Rätsels Lösung gefunden, so muss es aussehen:
function del_termin_block($termin_id) {
global $site_config, $session;
$query = "SELECT *
FROM cisco_weekplan_termin
WHERE termin_id = '".$termin_id."'";
$dummy = sql_query($query);
$check = db_result($dummy);
$sql = "DELETE FROM cisco_weekplan_user WHERE termin_id = '".$termin_id."'";
sql_query($sql);
$sql = "DELETE FROM cisco_weekplan_termin WHERE termin_id = '".$termin_id."'";
sql_query($sql);
$starthour=$check[0][termin_anf_std];
$endhour=$check[0][termin_anf_std]+'01';
for ($hour=$starthour; $hour<$check[0][termin_end_std]; $hour++) {
$insert = array('termin_fach' => $check[0][termin_fach],
'termin_class' => $check[0][termin_class],
'termin_raum' => $check[0][termin_raum],
'termin_anf_std' => $starthour,
'termin_anf_min' => '00',
'termin_end_std' => $endhour,
'termin_end_min' => '00',
'termin_tag' => $check[0][termin_tag],
'termin_kind' => 3,
'termin_ver' => 3);
$sql = make_sql_insert('cisco_weekplan_termin',$insert);
sql_query($sql);
$starthour=$endhour;
$endhour=$endhour+'01';
}
return true;
}