Doing math on mktime
Posted: Sat Mar 21, 2009 9:05 am
Hello,
I am storing the value of mktime in the endingdate column which is a bigint(20) unsigned field. I can get the value out just fine, but when I do math on it it overwrites. Here's what I'm doing: (using Database.class.php)
This is driving me nuts
I cannot troubleshoot this the normal way because this is in my Paypal ipn return script. So I cannot echo anything to the screen. Any ideas?
Thanks!
I am storing the value of mktime in the endingdate column which is a bigint(20) unsigned field. I can get the value out just fine, but when I do math on it it overwrites. Here's what I'm doing: (using Database.class.php)
Code: Select all
$sql = "SELECT endingdate FROM mytable WHERE id='".$id."'";
$row = $db->query_first($sql);
if ($row['endingdate'] != "") {
$days = 86400 * $days;
$endingdate += $days;
$daysinfo['endingdate'] = $endingdate;
$db->query_update("mytable", $daysinfo, "id='".$id."'");
}I cannot troubleshoot this the normal way because this is in my Paypal ipn return script. So I cannot echo anything to the screen. Any ideas?
Thanks!