selectrow_array("SELECT statval FROM stats ". "WHERE statcat='userinfo' AND statkey='randomcount'"); if ($max) { my $rand = int(rand($max))+1; my $user = $dbr->selectrow_array("SELECT u.user FROM randomuserset r, useridmap u ". "WHERE r.userid=u.userid AND r.rid=$rand"); return BML::redirect("$LJ::SITEROOT/users/$user/") if $user; } # something went wrong, redirect them back to top of site... *shrug* return BML::redirect("$LJ::SITEROOT/"); } _code?>1 _info?> link: htdocs/users _c?>