From 6008008569ac9e485c80ea65e0156885a6a0f501 Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Fri, 15 Apr 2011 08:31:17 +0000 Subject: [PATCH] =?UTF-8?q?=C3=BCberpr=C3=BCfung=20ob=20per=20SVNR=20oder?= =?UTF-8?q?=20per=20Name=20gefunden=20Datens=C3=A4tze=20mehr=20als=201=20s?= =?UTF-8?q?ind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soap/stip.class.php | 54 ++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/soap/stip.class.php b/soap/stip.class.php index ba3a1b4cc..e0f8b6034 100644 --- a/soap/stip.class.php +++ b/soap/stip.class.php @@ -134,18 +134,27 @@ class stip extends basis_db if($this->db_query($qry)) { - if($row = $this->db_fetch_object()) + // wenn mehr als 1 Datensatz gefunden wird --> Fehler + if($this->db_num_rows() == 1 ) { - $this->Vorname_Antwort = $row->vorname; - $this->Familienname_Antwort = $row->nachname; - $this->SVNR_Antwort = $row->svnr; - $this->PersKz_Antwort = trim($row->matrikelnr); - $this->AntwortStatusCode = 1; - return $row->prestudent_id; + if($row = $this->db_fetch_object()) + { + $this->Vorname_Antwort = $row->vorname; + $this->Familienname_Antwort = $row->nachname; + $this->SVNR_Antwort = $row->svnr; + $this->PersKz_Antwort = trim($row->matrikelnr); + $this->AntwortStatusCode = 1; + return $row->prestudent_id; + } + else + { + $this->AntwortStatusCode =2; + return false; + } } - else + else { - $this->AntwortStatusCode =2; + $this->AntwortStatusCode = 2; return false; } } @@ -172,20 +181,29 @@ class stip extends basis_db if($this->db_query($qry)) { - if($row = $this->db_fetch_object()) + if($this->db_num_rows() == 1 ) { - $this->Vorname_Antwort = $row->vorname; - $this->Familienname_Antwort = $row->nachname; - $this->SVNR_Antwort = $row->svnr; - $this->PersKz_Antwort = trim($row->matrikelnr); - $this->AntwortStatusCode = 1; - return $row->prestudent_id; + if($row = $this->db_fetch_object()) + { + $this->Vorname_Antwort = $row->vorname; + $this->Familienname_Antwort = $row->nachname; + $this->SVNR_Antwort = $row->svnr; + $this->PersKz_Antwort = trim($row->matrikelnr); + $this->AntwortStatusCode = 1; + return $row->prestudent_id; + } + else + { + $this->AntwortStatusCode =2; + return false; + } } - else + else { - $this->AntwortStatusCode =2; + $this->AntwortStatusCode = 2; return false; } + } else {