diff --git a/system/sync/stp/check_stpdb.php b/system/sync/stp/check_stpdb.php
index 1e4ee8962..8d63b5eb6 100644
--- a/system/sync/stp/check_stpdb.php
+++ b/system/sync/stp/check_stpdb.php
@@ -16,27 +16,44 @@
die('Fehler beim Verbindungsaufbau!');
mssql_select_db(STPDB_DB, $conn_ext);
- $tabellen=array("studiengang","person","lv","adresse","EMail","Note","SemesterplanEintrag","StudienGebuehren","StudienplanEintrag","StgVertiefung","StudIO","_person_studiengang");
+ $tabellen=array("studiengang","person","lv","adresse","EMail","Note","SemesterplanEintrag","StudienGebuehren","StudienplanEintrag","StgVertiefung","StudIO","_person_studiengang","cxPersonTyp","cxStudStatus");
+ if (isset($_POST['sql']))
+ $sql=$_POST['sql'];
+ else
+ $sql='SELECT TOP 30 * FROM ';
?>
- DB-CHECK DB StPoelten
+ DB-CHECK DB-StPoelten
+
Tabelle: '.$_GET['table'].' ('.$row->anz.' Eintraege)';
+ $sql='SELECT count(*) AS anz FROM '.$_GET['table'].';';
+
+ if ($ergebnis = mssql_query($sql,$conn_ext))
+ {
+ $row=mssql_fetch_object($ergebnis);
+ echo 'Tabelle: '.$_GET['table'].' ('.$row->anz.' Eintraege)
';
+ }
+ $sql='SELECT TOP 50 * FROM '.$_GET['table'];
+ if (isset($_GET['orderby']))
+ $sql.=' ORDER BY '.$_GET['orderby'];
+ $sql.=';';
}
- $sql='SELECT TOP 50 * FROM '.$_GET['table'].';';
+ else
+ $sql=$_POST['sql'];
if ($ergebnis = mssql_query($sql,$conn_ext))
{
$j=0;
@@ -44,7 +61,13 @@
for ($i = 0; $i < mssql_num_fields($ergebnis); $i++)
{
$infos = mssql_fetch_field($ergebnis, $i);
- echo ''.$infos->name.' ('.$infos->type.') | ';
+ echo ''.$infos->name.' ('.$infos->type.')';
+ if (isset($_GET['table']))
+ {
+ echo ' ↑';
+ echo ' ↓';
+ }
+ echo ' | ';
}
echo '';
while ($row=mssql_fetch_row($ergebnis))
@@ -57,6 +80,8 @@
}
echo '';
}
+ else
+ echo '
'.$sql.'
';
}
else
{
diff --git a/system/sync/stp/sync_stp_vilesci_lehrveranstaltungen.php b/system/sync/stp/sync_stp_vilesci_lehrveranstaltung.php
similarity index 100%
rename from system/sync/stp/sync_stp_vilesci_lehrveranstaltungen.php
rename to system/sync/stp/sync_stp_vilesci_lehrveranstaltung.php