+$query_total = urlencode(
+
+"Max N@@@select COUNT(DISTINCT test) as MAX from bench group by mark order by MAX desc LIMIT 0,1;"
+ . "###" .
+ "Number of compiled tests@@@select mark, COUNT(DISTINCT test) as N from bench group by mark order by mark desc***"
+);
+
+function minus1_to_all($s){
+ if ($s == "-1")
+ return "all";
+ else
+ return $s;
+}
+
+function links_of($name,$q,$limits){
+ echo "<li>$name : ";
+ if (strpos($q, urlencode("***")) === false) {
+ echo "<a href=\"showquery.php?query=$q;\">all</a>";
+ } else {
+ foreach($limits as $l) {
+ $q1 = str_replace(urlencode("***"), " LIMIT 0,$l", $q);
+ echo "<a href=\"showquery.php?query=$q1;\">" .
+ minus1_to_all($l) . "</a> ";
+ }
+ $q1 = str_replace(urlencode("***"), " ", $q);
+ echo "<a href=\"showquery.php?query=$q1;\">" .
+ minus1_to_all("-1") . "</a> ";
+ }
+ echo "</li>";
+}
+