Hi
Ich lege zuerst bei einer anderen Operation zehl leere Datensätze an.
und möchte diese nun gern ändern, also mit Inhalten füllen.
Der dazu vorhandene Script kann jeweils nur einen Datensatz
updaten (siehe unten) und Ich möchte alle zehn auf einmal haben.
Vielleicht ist es jetzt verständlicher 
Fields(‚id‘), $mutiereKursbesuche->Fields(‚t_statKB_id‘)))) {echo „SELECTED“;} ?>><?php echo $sucheStatKB->Fields(‚bezeichnung‘)?>
Hier nochmals der vollständige Script.
<?php //Connection statement
require\_once('Connections/conn.php');
//Aditional Functions
require\_once('includes/functions.inc.php');
// build the form action
$editFormAction = $\_SERVER['PHP\_SELF'] . (isset($\_SERVER['QUERY\_STRING']) ? "?" . $\_SERVER['QUERY\_STRING'] : "");
if ((isset($\_POST["MM\_update"])) && ($\_POST["MM\_update"] == "form1")) {
$updateSQL = sprintf("UPDATE t\_kurs SET t\_applikation\_id=%s, t\_dozent\_id=%s, t\_raum\_id=%s, t\_status\_id=%s, kursbeschrieb=%s, date1=%s, start\_time1=%s, end\_time1=%s, date2=%s, start\_time2=%s, end\_time2=%s, date3=%s, start\_time3=%s, end\_time3=%s, date4=%s, start\_time4=%s, end\_time4=%s, date5=%s, start\_time5=%s, end\_time5=%s, ueberbuchung=%s, min\_teilnehmer=%s WHERE id=%s",
GetSQLValueString($\_POST['t\_applikation\_id'], "int"),
GetSQLValueString($\_POST['t\_dozent\_id'], "int"),
GetSQLValueString($\_POST['t\_raum\_id'], "int"),
GetSQLValueString($\_POST['t\_status\_id'], "int"),
GetSQLValueString($\_POST['kursbeschrieb'], "text"),
GetSQLValueString($\_POST['date1'], "date"),
GetSQLValueString($\_POST['start\_time1'], "text"),
GetSQLValueString($\_POST['end\_time1'], "text"),
GetSQLValueString($\_POST['date2'], "date"),
GetSQLValueString($\_POST['start\_time2'], "text"),
GetSQLValueString($\_POST['end\_time2'], "text"),
GetSQLValueString($\_POST['date3'], "date"),
GetSQLValueString($\_POST['start\_time3'], "text"),
GetSQLValueString($\_POST['end\_time3'], "text"),
GetSQLValueString($\_POST['date4'], "date"),
GetSQLValueString($\_POST['start\_time4'], "text"),
GetSQLValueString($\_POST['end\_time4'], "text"),
GetSQLValueString($\_POST['date5'], "date"),
GetSQLValueString($\_POST['start\_time5'], "text"),
GetSQLValueString($\_POST['end\_time5'], "text"),
GetSQLValueString($\_POST['ueberbuchung'], "int"),
GetSQLValueString($\_POST['min\_teilnehmer'], "int"),
GetSQLValueString($\_POST['id'], "int"));
$Result1 = $conn-\>Execute($updateSQL) or die($conn-\>ErrorMsg());
$updateGoTo = "k\_kurs\_bearb.php";
if (isset($\_SERVER['QUERY\_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $\_SERVER['QUERY\_STRING'];
}
KT\_redir($updateGoTo);
}
if ((isset($\_POST["MM\_update"])) && ($\_POST["MM\_update"] == "form3")) {
$updateSQL = sprintf("UPDATE t\_kursbesuche SET t\_mitarbeiter\_id=%s, t\_statKB\_id=%s WHERE id=%s",
GetSQLValueString($\_POST['t\_mitarbeiter\_id'], "int"),
GetSQLValueString($\_POST['t\_statKB\_id'], "int"),
GetSQLValueString($\_POST['id'], "int"));
$Result1 = $conn-\>Execute($updateSQL) or die($conn-\>ErrorMsg());
$updateGoTo = "k\_kurs\_bearb\_\_.php";
if (isset($\_SERVER['QUERY\_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $\_SERVER['QUERY\_STRING'];
}
KT\_redir($updateGoTo);
}
// begin Recordset
$query\_sucheApplikation = "SELECT \* FROM t\_applikation";
$sucheApplikation = $conn-\>SelectLimit($query\_sucheApplikation) or die($conn-\>ErrorMsg());
$totalRows\_sucheApplikation = $sucheApplikation-\>RecordCount();
// end Recordset
// begin Recordset
$query\_sucheDozent = "SELECT \* FROM t\_dozent";
$sucheDozent = $conn-\>SelectLimit($query\_sucheDozent) or die($conn-\>ErrorMsg());
$totalRows\_sucheDozent = $sucheDozent-\>RecordCount();
// end Recordset
// begin Recordset
$query\_sucheStatus = "SELECT \* FROM t\_status";
$sucheStatus = $conn-\>SelectLimit($query\_sucheStatus) or die($conn-\>ErrorMsg());
$totalRows\_sucheStatus = $sucheStatus-\>RecordCount();
// end Recordset
// begin Recordset
$query\_sucheRaum = "SELECT \* FROM t\_raum";
$sucheRaum = $conn-\>SelectLimit($query\_sucheRaum) or die($conn-\>ErrorMsg());
$totalRows\_sucheRaum = $sucheRaum-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKurs = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKurs = $\_GET['recordID'];
}
$query\_mutiereKurs = sprintf("SELECT \* FROM t\_kurs WHERE id = %s", GetSQLValueString($colname\_\_mutiereKurs, "int"));
$mutiereKurs = $conn-\>SelectLimit($query\_mutiereKurs) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKurs = $mutiereKurs-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche = $\_GET['recordID'];
}
$query\_mutiereKursbesuche = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 1", GetSQLValueString($colname\_\_mutiereKursbesuche, "int"));
$mutiereKursbesuche = $conn-\>SelectLimit($query\_mutiereKursbesuche) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche = $mutiereKursbesuche-\>RecordCount();
// end Recordset
// begin Recordset
$query\_sucheMitarbeiter = "SELECT \* FROM t\_mitarbeiter";
$sucheMitarbeiter = $conn-\>SelectLimit($query\_sucheMitarbeiter) or die($conn-\>ErrorMsg());
$totalRows\_sucheMitarbeiter = $sucheMitarbeiter-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche2 = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche2 = $\_GET['recordID'];
}
$query\_mutiereKursbesuche2 = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 2", GetSQLValueString($colname\_\_mutiereKursbesuche2, "int"));
$mutiereKursbesuche2 = $conn-\>SelectLimit($query\_mutiereKursbesuche2) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche2 = $mutiereKursbesuche2-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche3 = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche3 = $\_GET['recordID'];
}
$query\_mutiereKursbesuche3 = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 3", GetSQLValueString($colname\_\_mutiereKursbesuche3, "int"));
$mutiereKursbesuche3 = $conn-\>SelectLimit($query\_mutiereKursbesuche3) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche3 = $mutiereKursbesuche3-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche4 = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche4 = $\_GET['recordID'];
}
$query\_mutiereKursbesuche4 = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 4", GetSQLValueString($colname\_\_mutiereKursbesuche4, "int"));
$mutiereKursbesuche4 = $conn-\>SelectLimit($query\_mutiereKursbesuche4) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche4 = $mutiereKursbesuche4-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche5 = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche5 = $\_GET['recordID'];
}
$query\_mutiereKursbesuche5 = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 5", GetSQLValueString($colname\_\_mutiereKursbesuche5, "int"));
$mutiereKursbesuche5 = $conn-\>SelectLimit($query\_mutiereKursbesuche5) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche5 = $mutiereKursbesuche5-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche6 = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche6 = $\_GET['recordID'];
}
$query\_mutiereKursbesuche6 = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 6", GetSQLValueString($colname\_\_mutiereKursbesuche6, "int"));
$mutiereKursbesuche6 = $conn-\>SelectLimit($query\_mutiereKursbesuche6) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche6 = $mutiereKursbesuche6-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche7 = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche7 = $\_GET['recordID'];
}
$query\_mutiereKursbesuche7 = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 7", GetSQLValueString($colname\_\_mutiereKursbesuche7, "int"));
$mutiereKursbesuche7 = $conn-\>SelectLimit($query\_mutiereKursbesuche7) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche7 = $mutiereKursbesuche7-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche8 = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche8 = $\_GET['recordID'];
}
$query\_mutiereKursbesuche8 = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 8", GetSQLValueString($colname\_\_mutiereKursbesuche8, "int"));
$mutiereKursbesuche8 = $conn-\>SelectLimit($query\_mutiereKursbesuche8) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche8 = $mutiereKursbesuche8-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche9 = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche9 = $\_GET['recordID'];
}
$query\_mutiereKursbesuche9 = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 9", GetSQLValueString($colname\_\_mutiereKursbesuche9, "int"));
$mutiereKursbesuche9 = $conn-\>SelectLimit($query\_mutiereKursbesuche9) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche9 = $mutiereKursbesuche9-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_mutiereKursbesuche10 = '-1';
if (isset($\_GET['recordID'])) {
$colname\_\_mutiereKursbesuche10 = $\_GET['recordID'];
}
$query\_mutiereKursbesuche10 = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 10", GetSQLValueString($colname\_\_mutiereKursbesuche10, "int"));
$mutiereKursbesuche10 = $conn-\>SelectLimit($query\_mutiereKursbesuche10) or die($conn-\>ErrorMsg());
$totalRows\_mutiereKursbesuche10 = $mutiereKursbesuche10-\>RecordCount();
// end Recordset
// begin Recordset
$colname\_\_sucheKursbesuche = '-1';
if (isset($\_GET['fld1'])) {
$colname\_\_sucheKursbesuche = $\_GET['fld1'];
}
$query\_sucheKursbesuche = sprintf("SELECT \* FROM t\_kursbesuche WHERE t\_kurs\_id = %s AND fld1 = 1", GetSQLValueString($colname\_\_sucheKursbesuche, "int"));
$sucheKursbesuche = $conn-\>SelectLimit($query\_sucheKursbesuche) or die($conn-\>ErrorMsg());
$totalRows\_sucheKursbesuche = $sucheKursbesuche-\>RecordCount();
// end Recordset
// begin Recordset
$query\_sucheStatKB = "SELECT \* FROM t\_statKB";
$sucheStatKB = $conn-\>SelectLimit($query\_sucheStatKB) or die($conn-\>ErrorMsg());
$totalRows\_sucheStatKB = $sucheStatKB-\>RecordCount();
// end Recordset
//PHP ADODB document - made with PHAkt 3.7.0
?\>
Firma Dozent bearbeiten
\<!--
function mmLoadMenus() {
if (window.mm\_menu\_0814164636\_0) return;
window.mm\_menu\_0814164636\_0 = new Menu("root",127,17,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#3E60A8","#000084","left","middle",3,0,1000,-5,7,true,false,true,0,false,true);
mm\_menu\_0814164636\_0.addMenuItem("Firma erfassen","window.open('d\_ausbfirma\_erf.php', '\_self');");
mm\_menu\_0814164636\_0.addMenuItem("Firma bearbeiten","window.open('d\_ausbfirma\_bearb.php', '\_self');");
mm\_menu\_0814164636\_0.hideOnMouseOut=false;
mm\_menu\_0814164636\_0.bgColor='#555555';
mm\_menu\_0814164636\_0.menuBorder=1;
mm\_menu\_0814164636\_0.menuLiteBgColor='#FFFFFF';
mm\_menu\_0814164636\_0.menuBorderBgColor='#777777';
mm\_menu\_0814164636\_0.writeMenus();
} // mmLoadMenus()
function MM\_swapImgRestore() { //v3.0
var i,x,a=document.MM\_sr; for(i=0;a&&i\<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM\_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM\_p) d.MM\_p=new Array();
var i,j=d.MM\_p.length,a=MM\_preloadImages.arguments; for(i=0; i\0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i\<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i\
mmLoadMenus();
KURS BEARBEITEN
Nr.:
<?php echo $mutiereKurs->Fields('id'); ?\>
Applikation:
<?php while(!$sucheApplikation->EOF){
?\>
Fields('id'), $mutiereKurs-\>Fields('t\_applikation\_id')))) {echo "SELECTED";} ?\>\><?php echo $sucheApplikation->Fields('app\_name').$sucheApplikation-\>Fields('version');?\><?php $sucheApplikation->MoveNext();
}
$sucheApplikation-\>MoveFirst();
?\>
Dozent:
<?php while(!$sucheDozent->EOF){
?\>
Fields('id'), $mutiereKurs-\>Fields('t\_dozent\_id')))) {echo "SELECTED";} ?\>\><?php echo $sucheDozent->Fields('dname').$sucheDozent-\>Fields('dvorname');?\><?php $sucheDozent->MoveNext();
}
$sucheDozent-\>MoveFirst();
?\>
Status:
<?php while(!$sucheStatus->EOF){
?\>
Fields('id'), $mutiereKurs-\>Fields('t\_status\_id')))) {echo "SELECTED";} ?\>\><?php echo $sucheStatus->Fields('bezeichnung')?\><?php $sucheStatus->MoveNext();
}
$sucheStatus-\>MoveFirst();
?\>
Raum:
<?php while(!$sucheRaum->EOF){
?\>
Fields('id'), $mutiereKurs-\>Fields('t\_raum\_id')))) {echo "SELECTED";} ?\>\><?php echo $sucheRaum->Fields('bezeichnung')?\><?php $sucheRaum->MoveNext();
}
$sucheRaum-\>MoveFirst();
?\>
Kursbeschrieb:
<?php echo $mutiereKurs->Fields('kursbeschrieb'); ?\>
1. Datum:
von:
bis:
2. Datum:
von:
bis:
3. Datum:
von:
bis:
4. Datum:
von:
bis:
5. Datum:
von:
bis:
Voll
Überbuchung:
Min. Teilnehmer:
Angemeldet:
<?php while(!$sucheMitarbeiter->EOF){
?\>
Fields('id'), $mutiereKursbesuche-\>Fields('t\_mitarbeiter\_id')))) {echo "SELECTED";} ?\>\><?php echo $sucheMitarbeiter->Fields('name')?\><?php $sucheMitarbeiter->MoveNext();
}
$sucheMitarbeiter-\>MoveFirst();
?\>
Status:
<?php while(!$sucheStatKB->EOF){
?\>
Fields('id'), $mutiereKursbesuche-\>Fields('t\_statKB\_id')))) {echo "SELECTED";} ?\>\><?php echo $sucheStatKB->Fields('bezeichnung')?\><?php $sucheStatKB->MoveNext();
}
$sucheStatKB-\>MoveFirst();
?\>