Index: trunk/MagicSoft/Mars/datacenter/db/querycal.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/querycal.php	(revision 8512)
+++ trunk/MagicSoft/Mars/datacenter/db/querycal.php	(revision 9498)
@@ -3,5 +3,5 @@
     function CreateQuery($_GET, $alias, $checkwhere)
     {
-        $query0 = "SELECT fSequenceFirst as 'Sequence#' ";
+        $query0 = "SELECT SQL_CALC_FOUND_ROWS fSequenceFirst as 'Sequence#' ";
 
         foreach ($_GET as $key => $element)
@@ -217,13 +217,15 @@
 
         $result0 = mysql_query($query0, $db_id);
+        $result1 = mysql_query("SELECT FOUND_ROWS()", $db_id);
 
         if ($result0)
         {
             if ($html=="1")
-                PrintMagicTable($result0, $alias, $rightalign, "", "", "", "", $_GET);
+                PrintMagicTable($result0, $alias, $rightalign, "", "", "", "", $result1);
             else
                 PrintText($result0);
 
             mysql_free_result($result0);
+            mysql_free_result($result1);
         }
         mysql_close($db_id);
