我的代码看起来像这样
$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;
}}
我想将值更改6001
为1 week
. 谁能告诉我如何计算价值1 week, 2 weeks and 1 month
?