Nevermind, It was due to a inconsistency in the DB.... It's sorted :P
----- Original Message ----- From: "Chris Knipe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 31, 2002 2:32 AM Subject: infinate loops > Lo, > > Quite desperate now... Or at least, I'm starting to get there... Can anyone > perhaps see why this loop is not exiting??? > > $quit=$now; > $glet=getdate($row['RenewDate']); > > // debug > echo "howlong: " . $howlong; > > while($quit<$howlong) { > > // debug > echo "quit: " . $quit . "<br>"; > > $quit=mktime(0, 0, 0, $glet['mon']+$row['BillPeriod'], $glet['mday'], > $glet['year']); > $retl+=$row['Cost']; > $glet=getdate($quit); > } > > > The values, > > $now = 1036360800 (mktime()) > $row['RenewDate'] = 1035928800 (MySQL DB - VARCHAR(12)) > $row['Cost'] = xx.xx (MySQL DB - DOUBLE(6,2)) > > $howlong is defined further up.... > $howlong=mktime(0, 0, 0, $_POST['month'], 1, $_POST['year']) > where... > 0 < $_POST['month'] > 12 > 2001 < $_POST['year'] > 2005 > > From the debug (Browser output)... > howlong: 1133388000 - now: 1036023598 (RenewDate: 1036360800) > quit: 1036023598 > quit: 1036360800 > quit: 1036360800 > quit: 1036360800 > > Thus, $quit is never incremented.... I'm *STUMPED* why not, or how to fix > this? :(( Each time, PHP times out (Script execution time exceeded), and it > *always* gives a line number for the timeout, that is inside the above while > loop. Hence, to my understanding, the loop never exits.... > > The loop, comes from cbms from voxel.net, stats.php > > Thanks for the help! > > -- > me > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php