Skip navigation
Currently Being Moderated

Division by zero

Mar 12, 2012 1:40 PM

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->setResize(218, 0, true);



Any help should be really appreciated, thanks!




More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points