mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
This commit is contained in:
@@ -89,7 +89,7 @@ class betriebsmitteltyp
|
||||
// ************************************************************
|
||||
function save()
|
||||
{
|
||||
|
||||
$dbanzahl=0;
|
||||
$qry1='SELECT * FROM public.tbl_betriebsmitteltyp WHERE beschreibung='.$this->addslashes($this->beschreibung).';';
|
||||
if($result1=pg_query($this->conn,$qry1))
|
||||
{
|
||||
@@ -97,9 +97,18 @@ class betriebsmitteltyp
|
||||
{
|
||||
if($row1 = pg_fetch_object($result1))
|
||||
{
|
||||
if($row1->anzahl==null)
|
||||
{
|
||||
$dbanzahl=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$dbanzahl=$row1->anzahl;
|
||||
}
|
||||
$qry='UPDATE public.tbl_betriebsmitteltyp SET '.
|
||||
'anzahl =anzahl+'.$this->anzahl.' '.
|
||||
'anzahl ='.$dbanzahl."+".$this->anzahl.' '.
|
||||
'WHERE beschreibung='.$this->addslashes($this->beschreibung).';';
|
||||
echo nl2br($qry."\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -109,6 +118,7 @@ class betriebsmitteltyp
|
||||
$this->addslashes($this->beschreibung).', '.
|
||||
$this->addslashes($this->anzahl).', '.
|
||||
$this->addslashes($this->kaution).');';
|
||||
echo nl2br($qry."\n");
|
||||
}
|
||||
if(pg_query($this->conn,$qry))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user