1 Reply Latest reply: Mar 13, 2012 6:41 PM by Atmosfera RSS

    Division by zero

    Atmosfera

      Hi there everybody, one question, I created a list using the dynamic list wizard, but when I run those lists I got this error:

       

      Warning: Division by zero in /home/arturo/public_html/James/list-brokerage-by-category.php on line 153

       

      My question is, what I'm doing wrong?

       

      This is the specific line:

       

      $totalPages_rsBJ = ceil($totalRows_rsBJ/$maxRows_rsBJ)-1;

       

      and this is the block of 10 lines before and after that error:

       

      $query_rsBJ = "SELECT CompanyInfo.CompanyInfo_Logo, CompanyInfo.CompanyInfo_COName, Jobs.Job_Date, Jobs.Job_Position, Jobs.Job_Salary, Jobs.Job_Division, Jobs.Job_City, Jobs.Job_State, Jobs.Job_Contact, Jobs.Job_Email, Jobs.Job_Summary, Jobs.Job_ID, Jobs.ID_User, Jobs.Job_Department FROM (Jobs LEFT JOIN CompanyInfo ON CompanyInfo.ID_User=Jobs.ID_User) WHERE  {$NXTFilter_rsBJ}  ORDER BY  {$NXTSort_rsBJ} ";

      $query_limit_rsBJ = sprintf("%s LIMIT %d, %d", $query_rsBJ, $startRow_rsBJ, $maxRows_rsBJ);

      $rsBJ = mysql_query($query_limit_rsBJ, $TheInsuranceBlock) or die(mysql_error());

      $row_rsBJ = mysql_fetch_assoc($rsBJ);

       

       

      if (isset($_GET['totalRows_rsBJ'])) {

        $totalRows_rsBJ = $_GET['totalRows_rsBJ'];

      } else {

        $all_rsBJ = mysql_query($query_rsBJ);

        $totalRows_rsBJ = mysql_num_rows($all_rsBJ);

      }

      $totalPages_rsBJ = ceil($totalRows_rsBJ/$maxRows_rsBJ)-1;

      //End NeXTenesio3 Special List Recordset

       

       

      // Show Dynamic Thumbnail

      $objDynamicThumb1 = new tNG_DynamicThumbnail("", "KT_thumbnail1");

      $objDynamicThumb1->setFolder("uploads/");

      $objDynamicThumb1->setRenameRule("{rsPlatinumSponsors.Image}");

      $objDynamicThumb1->setResize(218, 0, true);

      $objDynamicThumb1->setWatermark(false);

       

      Any help should be really appreciated, thanks!

       

      Arturo