global $vbulletin; $datecut = TIMENOW - 86400; $postcount = $db->query_first("SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "post WHERE userid = '".$vbulletin->userinfo['userid']."' AND dateline >= ".$datecut."");