Updated:
= 31536000) {
// More than a year
$timeAgo = floor($timeDifference / 31536000);
echo $timeAgo . ' year' . ($timeAgo > 1 ? 's' : '') . ' ago';
} elseif ($timeDifference >= 2419200) {
// More than a month
$timeAgo = floor($timeDifference / 2419200);
echo $timeAgo . ' month' . ($timeAgo > 1 ? 's' : '') . ' ago';
} elseif ($timeDifference >= 604800) {
// More than a week
$timeAgo = floor($timeDifference / 604800);
echo $timeAgo . ' week' . ($timeAgo > 1 ? 's' : '') . ' ago';
} elseif ($timeDifference >= 86400) {
// More than a day
$timeAgo = floor($timeDifference / 86400);
echo $timeAgo . ' day' . ($timeAgo > 1 ? 's' : '') . ' ago';
} elseif ($timeDifference >= 3600) {
// More than an hour
$timeAgo = floor($timeDifference / 3600);
echo $timeAgo . ' hour' . ($timeAgo > 1 ? 's' : '') . ' ago';
} elseif ($timeDifference >= 60) {
// More than a minute
$timeAgo = floor($timeDifference / 60);
echo $timeAgo . ' minute' . ($timeAgo > 1 ? 's' : '') . ' ago';
} else {
// Less than a minute
echo $timeDifference . ' second' . ($timeDifference > 1 ? 's' : '') . ' ago';
}
?>
Number Sold:
prepare("SELECT * FROM owneditems WHERE itemid=:itemid");
$stmt2->bindValue(':itemid', $row['id'], PDO::PARAM_STR);
$stmt2->execute();
$result2 = $stmt2->rowCount();
echo $result2;
?>
Favorited: 0 times
: