use postgres function

This commit is contained in:
chfhtw
2025-10-02 15:43:24 +02:00
parent b2ccc42aa2
commit ba1401f98d
10 changed files with 27 additions and 27 deletions
+1 -11
View File
@@ -328,17 +328,7 @@ $config['prestudent'] = [
WHERE status_kurzbz = public.get_rolle_prestudent(ps.prestudent_id, NULL)
LIMIT 1
) AS status",
"COALESCE(
(
SELECT COALESCE(plan.orgform_kurzbz, pss.orgform_kurzbz)
FROM public.tbl_prestudentstatus pss
LEFT JOIN lehre.tbl_studienplan plan USING (studienplan_id)
WHERE pss.prestudent_id=ps.prestudent_id
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
LIMIT 1
),
sg.orgform_kurzbz
) AS orgform",
"public.get_orgform_prestudent(ps.prestudent_id, NULL) AS orgform",
"b.aktiv",
"array_position(" . $prestudent_sort_array . ", public.get_rolle_prestudent(ps.prestudent_id, NULL)) AS sort"
],