- tbl_bisio prestudent_id hinzugefuegt

- betroffene seiten angepasst
This commit is contained in:
ma0048
2023-03-15 14:17:04 +01:00
parent c411b826d9
commit 90aeb00d3c
19 changed files with 238 additions and 218 deletions
+1
View File
@@ -31,6 +31,7 @@ require_once('dbupdate_3.4/example2.php');
require_once('dbupdate_3.4/26173_index_webservicelog.php');
require_once('dbupdate_3.4/24682_reihungstest_zugangscode_fuer_login.php');
require_once('dbupdate_3.4/17512_fehlercode_constraints.php');
require_once('dbupdate_3.4/28276_eine_uid_tbl_bisio.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -0,0 +1,18 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
if(!$result = @$db->db_query("SELECT prestudent_id FROM bis.tbl_bisio LIMIT 1"))
{
$qry = "ALTER TABLE bis.tbl_bisio ADD COLUMN prestudent_id int;
UPDATE bis.tbl_bisio
SET prestudent_id = student.prestudent_id
FROM tbl_student student
WHERE tbl_bisio.student_uid = student.student_uid;";
if(!$db->db_query($qry))
echo '<strong>bis.tbl_bisio: '.$db->db_last_error().'</strong><br>';
else
echo '<br>bis.tbl_bisio: Spalte prestudent_id hinzugefuegt';
}
+1 -1
View File
@@ -494,7 +494,7 @@ $qry = "SELECT
JOIN public.tbl_prestudent USING(prestudent_id)
JOIN public.tbl_person USING(person_id)
WHERE
NOT EXISTS(SELECT 1 FROM bis.tbl_bisio WHERE student_uid=tbl_student.student_uid)
NOT EXISTS(SELECT 1 FROM bis.tbl_bisio WHERE tbl_bisio.prestudent_id = tbl_prestudent.prestudent_id)
AND EXISTS(SELECT 1 FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_student.prestudent_id AND status_kurzbz='Incoming')";
if($result = $db->db_query($qry))