BugFix Function getStudiengaengeDokument

Added db_num_rows before while-loop
This commit is contained in:
Manfred Kindl
2018-05-15 16:30:47 +02:00
parent 499e8d200b
commit 37650f4d30
+13 -8
View File
@@ -832,16 +832,21 @@ class dokument extends basis_db
if($result = $this->db_query($qry))
{
$stg_obj = new basis_db();
while($row = $this->db_fetch_object($result))
if ($this->db_num_rows($result) > 0)
{
$stg_obj->kuerzel = $row->kuerzel;
$stg_obj->bezeichnung = $row->bezeichnung;
$stg_obj->studiengang_kz = $row->studiengang_kz;
$this->result[] = $stg_obj;
while($row = $this->db_fetch_object($result))
{
$stg_obj = new basis_db();
$stg_obj->kuerzel = $row->kuerzel;
$stg_obj->bezeichnung = $row->bezeichnung;
$stg_obj->studiengang_kz = $row->studiengang_kz;
$this->result[] = $stg_obj;
}
return $stg_obj;
}
return $stg_obj;
else
return false;
}
else
{