Sort requests by type
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 12 Apr 2007 08:29:39 +0000 (08:29 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 12 Apr 2007 08:29:39 +0000 (08:29 +0000)
 cron_validations.php |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1688 839d8a87-29fc-0310-9880-83ba4fa771e5

bin/cron/cron_validations.php

index 3768240..68c3c0f 100755 (executable)
@@ -46,7 +46,15 @@ $message =
        .(empty($nbold)?"":"dont $nbold depuis le dernier mail !!!\n")
        .(empty($nbveryold)?"":"et dont *$nbveryold* sont en retard de plus de 6h !!!")
        ."\n"
-       ."https://www.polytechnique.org/admin/validate\n";
+       ."https://www.polytechnique.org/admin/validate\n\n"
+        ."Par catégorie :\n";
+$res = XDB::iterRow("SELECT  type, count(*)
+                       FROM  x4dat.requests
+                   GROUP BY  type
+                   ORDER BY  type");
+while (list($type, $nb) = $res->next()) {
+    $message .= "- $type: $nb\n";
+}
 
 $message = wordwrap($message,78);  
 $mymail->setTxtBody($message);