Index: trunk/MagicSoft/Mars/datacenter/db/culminating.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/culminating.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/culminating.php	(revision 8122)
@@ -21,5 +21,5 @@
             //--------------------------------------------------
             $query0 .= " SUM(fNumEvents) as '" . $alias["SUM(fNumEvents)"] . "', ";
-            $query0 .= " COUNT(*) as 'Sequ#' ";
+            $query0 .= " COUNT(*) as '# Sequ' ";
         }
         else
Index: trunk/MagicSoft/Mars/datacenter/db/datasetinfo-aio.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/datasetinfo-aio.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/datasetinfo-aio.php	(revision 8122)
@@ -22,5 +22,5 @@
                 if ($element==-1)
                     $query0 .=  $key . " as '" . $alias[$key] . "' " . ", ";
-            $query0 .= " COUNT(*) as 'Dataset#' ";
+            $query0 .= " COUNT(*) as '# Datasets' ";
         }
         else
@@ -33,5 +33,5 @@
 //                        $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', ";
 
-                $query0 .= " count(*) as 'DataSet#'";
+                $query0 .= " COUNT(*) as '# Datasets'";
 
             }
Index: trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php	(revision 8122)
@@ -22,5 +22,5 @@
                 if ($element==-1)
                     $query0 .=  $key . " as '" . $alias[$key] . "' " . ", ";
-            $query0 .= " COUNT(*) as 'Dataset#' ";
+            $query0 .= " COUNT(*) as '# Datasets' ";
         }
         else
@@ -33,5 +33,5 @@
 //                        $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', ";
 
-                $query0 .= " count(*) as 'DataSet#'";
+                $query0 .= " COUNT(*) as '# Datasets'";
 
             }
Index: trunk/MagicSoft/Mars/datacenter/db/include.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/include.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/include.php	(revision 8122)
@@ -388,4 +388,12 @@
             return $key;
 
+    if ($search=="# Runs")
+        return "NumRuns";
+    if ($search=="# Sequ")
+        return "NumSequ";
+    if ($search=="# Datasets")
+        return "NumDS";
+    if ($search=="# days")
+        return "NumDays";
     return "";
 }
Index: trunk/MagicSoft/Mars/datacenter/db/index.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/index.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/index.php	(revision 8122)
@@ -27,5 +27,5 @@
             $query0 .= " Min(fZenithDistance) as '" . $alias["Min(fZenithDistance)"] . "', ";
             $query0 .= " Max(fZenithDistance) as '" . $alias["Max(fZenithDistance)"] . "', ";
-            $query0 .= " COUNT(*) as 'Runs#' ";
+            $query0 .= " COUNT(*) as '# Runs' ";
         }
         else
Index: trunk/MagicSoft/Mars/datacenter/db/magicdefs.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/magicdefs.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/magicdefs.php	(revision 8122)
@@ -270,5 +270,4 @@
      "Min(fZenithDistance)"             => "ZdMin",
      "Max(fZenithDistance)"             => "ZdMax",
-     "COUNT(*)"                         => "Sequence",
 //     "fArrTimeLimit"                    => "ArrTRms",
      "fArrTimeLimit"                    => "ArrTime",
@@ -300,4 +299,6 @@
      "fFailedCode"                      => "Err<br>Code",
      "fFailedCodeAdd"                   => "Code<br>Add",
+//     "COUNT(*)"                         => "# Runs",
+//     "COUNT(*)"                         => "Sequence",
     );
 
@@ -551,5 +552,5 @@
          "Min(fZenithDistance)"              => "'ZdMin'",
          "Max(fZenithDistance)"              => "'ZdMax'",
-         "COUNT(*)"                          => "'Sequence'",
+//         "COUNT(*)"                          => "'Sequence'",
          "fStartTime"                        => "fStartTime",
          "fFailedTime"                       => "fFailedTime",
@@ -563,4 +564,12 @@
     if (!empty($tables[$val]))
         $table=$tables[$val];
+    if ($val=="NumRuns")
+        $table="'# Runs'";
+    if ($val=="NumSequ")
+        $table="'# Sequ'";
+    if ($val=="NumDS")
+        $table="'# Datasets'";
+    if ($val=="NumDays")
+        $table="'# days'";
     return $table;
 }
Index: trunk/MagicSoft/Mars/datacenter/db/querymc.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/querymc.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/querymc.php	(revision 8122)
@@ -27,5 +27,5 @@
 //            $query0 .= " Min(fZenithDistance) as '" . $alias["Min(fZenithDistance)"] . "', ";
 //            $query0 .= " Max(fZenithDistance) as '" . $alias["Max(fZenithDistance)"] . "', ";
-            $query0 .= " COUNT(*) as 'Runs#' ";
+            $query0 .= " COUNT(*) as '# Runs' ";
         }
         else
Index: trunk/MagicSoft/Mars/datacenter/db/queryseq.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/queryseq.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/queryseq.php	(revision 8122)
@@ -23,5 +23,5 @@
             $query0 .= " Min(fZenithDistanceMin) as '" . $alias["Min(fZenithDistanceMin)"] . "', ";
             $query0 .= " Max(fZenithDistanceMax) as '" . $alias["Max(fZenithDistanceMax)"] . "', ";
-            $query0 .= " COUNT(*) as 'Sequence#' ";
+            $query0 .= " COUNT(*) as '# Sequ' ";
         }
         else
Index: trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php	(revision 8122)
@@ -43,5 +43,5 @@
 //                        $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', ";
 
-                $query0 .= " count(*) as '# Run'";
+                $query0 .= " count(*) as '# Runs'";
 
             }
@@ -173,4 +173,5 @@
         {
             $val=substr($_GET["fSortBy"], 0, -1);
+//            $query0 .= "---" . $val . "---";
             $query0 .= " ORDER BY " . GetTable($fromtable, $val) . " ";
             if (substr($_GET["fSortBy"], -1)=="-")
Index: trunk/MagicSoft/Mars/datacenter/db/runinfo.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/runinfo.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/runinfo.php	(revision 8122)
@@ -43,5 +43,5 @@
 //                        $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', ";
 
-                $query0 .= " count(*) as '# Run'";
+                $query0 .= " count(*) as '# Runs'";
 
             }
Index: trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php	(revision 8122)
@@ -28,5 +28,5 @@
             $query0 .= " Min(fZenithDistanceMin) as '" . $alias["Min(fZenithDistanceMin)"] . "', ";
             $query0 .= " Max(fZenithDistanceMax) as '" . $alias["Max(fZenithDistanceMax)"] . "', ";
-            $query0 .= " COUNT(*) as 'Sequence' ";
+            $query0 .= " COUNT(*) as '# Sequ' ";
         }
         else
@@ -39,5 +39,5 @@
 //                        $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', ";
 
-                $query0 .= " count(*) as 'Sequence'";
+                $query0 .= " COUNT(*) as '# Sequ'";
 
             }
Index: trunk/MagicSoft/Mars/datacenter/db/sequinfo.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/sequinfo.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/sequinfo.php	(revision 8122)
@@ -28,5 +28,5 @@
             $query0 .= " Min(fZenithDistanceMin) as '" . $alias["Min(fZenithDistanceMin)"] . "', ";
             $query0 .= " Max(fZenithDistanceMax) as '" . $alias["Max(fZenithDistanceMax)"] . "', ";
-            $query0 .= " COUNT(*) as 'Sequence' ";
+            $query0 .= " COUNT(*) as '# Sequ' ";
         }
         else
@@ -39,5 +39,5 @@
 //                        $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', ";
 
-                $query0 .= " count(*) as 'Sequence'";
+                $query0 .= " COUNT(*) as '# Sequ'";
 
             }
Index: trunk/MagicSoft/Mars/datacenter/db/statusrps.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/statusrps.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/statusrps.php	(revision 8122)
@@ -17,10 +17,10 @@
 //                    $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $key . "', ";
 
-            $query0 .= " count(*) as 'Run#'";
-
-        }
-        else
-        {
-            $query0 .= "fRunNumber as 'Run#' ";
+            $query0 .= " count(*) as '# Runs'";
+
+        }
+        else
+        {
+            $query0 .= "fRunNumber as '# Runs' ";
 
             foreach ($_GET as $key => $element)
Index: trunk/MagicSoft/Mars/datacenter/db/statussbs.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/statussbs.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/statussbs.php	(revision 8122)
@@ -17,5 +17,5 @@
 //                    $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', ";
 
-            $query0 .= " count(*) as '#days'";
+            $query0 .= " count(*) as '# days'";
 
         }
Index: trunk/MagicSoft/Mars/datacenter/db/statussps.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/statussps.php	(revision 8121)
+++ trunk/MagicSoft/Mars/datacenter/db/statussps.php	(revision 8122)
@@ -17,5 +17,5 @@
 //                    $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', ";
 
-            $query0 .= " count(*) as 'Sequence#'";
+            $query0 .= " count(*) as '# Sequ'";
 
         }
