Index: /trunk/MagicSoft/Mars/datacenter/db/builddatasets.php
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/db/builddatasets.php	(revision 8767)
+++ /trunk/MagicSoft/Mars/datacenter/db/builddatasets.php	(revision 8768)
@@ -136,6 +136,6 @@
             $query0 = substr($query0, 0, -4);
 
-        if (!empty($_GET["fZDMin"]) && !empty($_GET["fZDMax"]))
-            $query0 .= "AND (fZenithDistanceMin > " . $_GET["fZDMin"] . " AND fZenithDistanceMax < " . $_GET["fZDMax"] . ") ";
+        if ((!empty($_GET["fZDMin"]) || $_GET["fZDMin"]==0) && !empty($_GET["fZDMax"]))
+            $query0 .= "AND (fZenithDistanceMin >= " . $_GET["fZDMin"] . " AND fZenithDistanceMax <= " . $_GET["fZDMax"] . ") ";
 
         if (!empty($_GET["fSourceN"]))
Index: /trunk/MagicSoft/Mars/datacenter/db/findoffdata.php
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/db/findoffdata.php	(revision 8767)
+++ /trunk/MagicSoft/Mars/datacenter/db/findoffdata.php	(revision 8768)
@@ -127,6 +127,6 @@
             $query0 = substr($query0, 0, -4);
 
-        if (!empty($_GET["fZDMin"]) && !empty($_GET["fZDMax"]))
-            $query0 .= "AND (fZenithDistanceMin > " . $_GET["fZDMin"] . " AND fZenithDistanceMax < " . $_GET["fZDMax"] . ") ";
+        if ((!empty($_GET["fZDMin"]) || $_GET["fZDMin"]==0) && !empty($_GET["fZDMax"]))
+            $query0 .= "AND (fZenithDistanceMin >= " . $_GET["fZDMin"] . " AND fZenithDistanceMax <= " . $_GET["fZDMax"] . ") ";
 
         if (!empty($_GET["fSourceN"]))
Index: /trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php	(revision 8767)
+++ /trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php	(revision 8768)
@@ -103,5 +103,5 @@
             $query0 .= "RunData.fRunNumber BETWEEN " . $_GET["fRunMin"] . " AND " . $_GET["fRunMax"] . " ";
 
-        if (!empty($_GET["fZDMin"]) && !empty($_GET["fZDMax"]))
+        if ((!empty($_GET["fZDMin"]) || $_GET["fZDMin"]==0) && !empty($_GET["fZDMax"]))
             $query0 .= "AND fZenithDistance BETWEEN " . $_GET["fZDMin"] . " AND  " . $_GET["fZDMax"] . " ";
 
Index: /trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php	(revision 8767)
+++ /trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php	(revision 8768)
@@ -140,6 +140,6 @@
             $query0 = substr($query0, 0, -4);
 
-        if (!empty($_GET["fZDMin"]) && !empty($_GET["fZDMax"]))
-            $query0 .= "AND (fZenithDistanceMin > " . $_GET["fZDMin"] . " AND fZenithDistanceMax < " . $_GET["fZDMax"] . ") ";
+        if ((!empty($_GET["fZDMin"]) || $_GET["fZDMin"]==0) && !empty($_GET["fZDMax"]))
+            $query0 .= "AND (fZenithDistanceMin >= " . $_GET["fZDMin"] . " AND fZenithDistanceMax <= " . $_GET["fZDMax"] . ") ";
 
         if (!empty($_GET["fSourceN"]))
