]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/scripts/public_html/composequery.php
fix
[helm.git] / helm / matita / scripts / public_html / composequery.php
index 683df4daacede2f14bd919fc0a279226e1c33615..49a943e47b61f5f443de93261ccec984078c3822 100644 (file)
@@ -21,6 +21,7 @@
   }
   
   $gb = $_GET['groupby'];
+  $limit = $_GET['limit'];
   if($gb != "--")
     $what = "mark, SEC_TO_TIME(SUM(TIME_TO_SEC(time))) as sum_time, SEC_TO_TIME(SUM(TIME_TO_SEC(timeuser))) as sum_timeuser";
   else
   if( $gb != "--"){
     $query = $query. "group by $gb";
   }
+
+  if($limit != "--") {
+    $query = $query. " LIMIT 0,$limit";
+  }
+
    $query = $query. ";"; 
 
    header("Location: showquery.php?query=".urlencode("Custom:@@@" . $query));