0

我的代码看起来像这样

$checksql= "SELECT Body, ( NOW() - Updated ) as Age FROM ".$wpdb->prefix."amazoncache WHERE URL = '" . $keyurl . "' AND NOT( Body LIKE '%AccountLimitExceeded%') AND NOT( Body LIKE '%SignatureDoesNotMatch%') AND NOT( Body LIKE '%InvalidParameterValue%');";
        $result = $wpdb->get_results($checksql);

        if (count($result) > 0){
            if ($result[0]->Age <= 6001 && $result[0]->Body != ''){ //that would be 60 min 1 seconds on MYSQL value
                $pxml = GetXMLTree($result[0]->Body);
                return $pxml;
            }}

我想将值更改60011 week. 谁能告诉我如何计算价值1 week, 2 weeks and 1 month

4

1 回答 1

1

所以像这样。。

$var = 3601; // (60 * 60) + 1
$oneWeek = $var+strtotime("+1 week");
$twoWeek = $var+strtotime("+2 week");
$oneMonth = $var+strtotime("+1 month");

我在球场上吗?

于 2012-11-27T09:20:10.430 回答