diff options
author | Angelo Cuccato <cuccato@web.de> | 2010-12-30 13:46:36 +0100 |
---|---|---|
committer | Angelo Cuccato <cuccato@web.de> | 2010-12-30 13:46:36 +0100 |
commit | ad256ad33941a60e46dbb1daa6531e4246ebf95c (patch) | |
tree | ba5ec4aca4adc4ca3ed4c823b0c1af0c36819c64 | |
parent | 50030ff31f25aefc99e3590e2f8530c8c924583e (diff) |
add more statistics
-rwxr-xr-x | www-ssl/admin/aktiv.php | 2 | ||||
-rwxr-xr-x | www-ssl/admin/debug.php | 18 |
2 files changed, 17 insertions, 3 deletions
diff --git a/www-ssl/admin/aktiv.php b/www-ssl/admin/aktiv.php index 1dc24011..2ad92b3d 100755 --- a/www-ssl/admin/aktiv.php +++ b/www-ssl/admin/aktiv.php @@ -55,7 +55,7 @@ echo "</tr>\n"; $SQL = " SELECT d.UID, d.nr, d.len, d.lenWeight, f.nr AS nrFree, f.len AS lenFree, d.lenWeight - COALESCE(f.len, 0) as lenReal FROM - (SELECT e.UID, COUNT(s.Len) as nr, SUM(s.Len) as len, SUM( s.Len*(1+(((HOUR(s.DateS)+2)%24)<10 and ((HOUR(s.DateE)+2)%24)<10)) ) as lenWeight FROM `Shifts` AS s INNER JOIN `ShiftEntry` AS e USING(SID) WHERE NOT UID=0 GROUP BY UID) as d + (SELECT e.UID, COUNT(s.Len) as nr, SUM(s.Len) as len, SUM( s.Len*(1+(((HOUR(s.DateS)+2)%24)<10 and ((HOUR(s.DateE)+2)%24)<=10)) ) as lenWeight FROM `Shifts` AS s INNER JOIN `ShiftEntry` AS e USING(SID) WHERE NOT UID=0 GROUP BY UID) as d LEFT JOIN (SELECT UID, COUNT(Length) AS nr, SUM(Length) AS len FROM `ShiftFreeloader` GROUP BY UID) AS f USING(UID) diff --git a/www-ssl/admin/debug.php b/www-ssl/admin/debug.php index af42dd20..d6d5f79b 100755 --- a/www-ssl/admin/debug.php +++ b/www-ssl/admin/debug.php @@ -30,7 +30,7 @@ funktion_db_list("FAQ"); echo "Deaktiviert"; */ -echo "<br>\n"; +echo "<hr>\n"; funktion_db_element_list_2row( "Tshirt-Size aller engel", "SELECT `Size`, COUNT(`Size`) FROM `User` GROUP BY `Size`"); @@ -42,7 +42,7 @@ echo "<br>\n"; funktion_db_element_list_2row( "Tshirt nicht ausgegeben (Gekommen=1)", "SELECT COUNT(`Size`), `Size` FROM `User` WHERE `Gekommen`='1' and `Tshirt`='0' GROUP BY `Size`"); -echo "<br>\n"; +echo "<hr>\n"; funktion_db_element_list_2row( "Hometown", "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`"); @@ -50,6 +50,20 @@ echo "<br>\n"; funktion_db_element_list_2row( "Engeltypen", "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`"); +echo "<hr>\n"; +funktion_db_element_list_2row( "Gesamte Arbeit", + "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID)"); + +echo "<br>\n"; +funktion_db_element_list_2row( "Geleisteter Arbeit", + "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0)"); + +echo "<br>\n"; +funktion_db_element_list_2row( "Geleisteter Arbeit (Ohne Raum aufabau (RID=7)", + "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0) AND (Shifts.RID!=7)"); + + + include ("../../includes/footer.php"); ?> |