Anpassung an Datenbankklasse

This commit is contained in:
Andreas Österreicher
2012-09-18 06:58:20 +00:00
parent 7d1374b788
commit a6faca0311
2 changed files with 49 additions and 48 deletions
+7 -7
View File
@@ -70,16 +70,16 @@ class stunde extends basis_db
if($this->new)
{
$qry = "INSERT INTO lehre.tbl_stunde (stunde, beginn, ende)
VALUES('".$this->stunde."',".
$this->addslashes($this->beginn).','.
$this->addslashes($this->ende).');';
VALUES(".$this->db_add_param($this->stunde).",".
$this->db_add_param($this->beginn).','.
$this->db_add_param($this->ende).');';
}
else
{
$qry = 'UPDATE lehre.tbl_stunde SET'.
' beginn='.$this->addslashes($this->beginn).','.
' ende='.$this->addslashes($this->ende).
" WHERE stunde=".$this->stunde;
' beginn='.$this->db_add_param($this->beginn).','.
' ende='.$this->db_add_param($this->ende).
" WHERE stunde=".$this->db_add_param($this->stunde);
}
if($this->db_query($qry))
@@ -88,7 +88,7 @@ class stunde extends basis_db
}
else
{
$this->errormsg = 'Fehler beim Speichern der Stunde:'.$qry;
$this->errormsg = 'Fehler beim Speichern der Stunde';
return false;
}
}