\n"; ?> hier findest du alle Engel, welche zur Zeit in Schichten verplant sind:

now() ORDER BY Nick"; /* geht nicht ??? unter stabel !! $SQL= "SELECT User.Nick, Schichtplan.*, Schichtbelegung.* ". "FROM Schichtplan, User LEFT OUTER ". "JOIN Schichtbelegung ON User.UID=Schichtbelegung.UID ". "WHERE Schichtplan.SID = Schichtbelegung.SID AND ". "Schichtplan.Date < now() and ". "Schichtplan.EndDate > now() ". "ORDER BY Nick"; $SQL = "SELECT Shifts.*, ShiftEntry.*, User.Nick ". "FROM User ". "INNER JOIN (Shifts INNER JOIN ShiftEntry ON Shifts.SID = ShiftEntry.SID) ON User.UID = ShiftEntry.UID ". "WHERE (Shifts.DateS<=Now() AND Shifts.DateE>=Now() );"; */ $SQL = "SELECT Shifts.*, ShiftEntry.* ". "FROM Shifts INNER JOIN ShiftEntry ON Shifts.SID = ShiftEntry.SID ". "WHERE (Shifts.DateS<=Now() AND Shifts.DateE>=Now() );"; //SELECT User.Nick, Schichtplan.*, Schichtbelegung. * FROM User LEFT JOIN Schichtbelegung ON User.UID=Schichtbelegung.UID, Schichtplan LEFT JOIN Schichtbelegung ON Schichtplan.SID = Schichtbelegung.SID WHERE Schichtplan.Date < now() and Schichtplan.EndDate > now() ORDER BY Nick //echo "
$SQL
"; $Erg = mysql_query($SQL, $con); $Zeilen = mysql_num_rows($Erg); // for ($i = 1; $i < mysql_num_fields($Erg); $i++) // echo "|".mysql_field_name($Erg, $i); echo "\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; $inuse=""; for ($i=0; $i < $Zeilen; $i++) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($inuse!="") $inuse.= " OR "; $inuse.= "(Nick = \"". UID2Nick(mysql_result($Erg, $i, "UID")). "\")"; } if ($inuse!="") $inuse=" WHERE NOT (".$inuse.")"; echo "
NickSchichtOrtVonBis
". mysql_result($Erg, $i, "Nick"). "". UID2Nick(mysql_result($Erg, $i, "UID")). "". mysql_result($Erg, $i, "RID"). "". mysql_result($Erg, $i, "DateS"). "". mysql_result($Erg, $i, "DateE"). "
\n"; //########################################################################################################## echo "

\n\nhier findest du alle Engel, welche zur Zeit in keiner Schichten verplant sind:

\n"; echo "\n"; echo "\t\n\t\t\n\t\t\n\t\n"; $SQL = "SELECT Nick, UID, DECT FROM User".$inuse.";"; $Erg = mysql_query($SQL, $con); $Zeilen = mysql_num_rows($Erg); for ($i=0; $i < $Zeilen; $i++) { echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\n\n"; } echo "
NickDECT
". mysql_result($Erg, $i, "Nick"). "". mysql_result($Erg, $i, "DECT"). "
\n"; include ("./inc/footer.php"); ?>