$days = 1; $points = 10; $cutoff = TIMENOW - (86400 * $days); $vbulletin->db->query_write(" UPDATE ".TABLE_PREFIX."user SET reputation = reputation - $points WHERE lastactivity < $cutoff ");