Index: trunk/ippMonitor/raw/ipp.php
===================================================================
--- trunk/ippMonitor/raw/ipp.php	(revision 18970)
+++ trunk/ippMonitor/raw/ipp.php	(revision 19302)
@@ -416,5 +416,9 @@
 }
 
-function check_ordering ($where) {
+function check_ordering ($groups, $where) {
+
+  if ($groups != "") {
+    $where = $where . " GROUP BY $groups";
+  }
 
   if ($_SERVER[REQUEST_METHOD] == 'GET') { 
