\r\n"; $total=0; $i=0; $counter=0; $playersfirstname = array(); $playersmiddlename = array(); $playerslastname = array(); $playersaname = array(); $numberedcards = array(); $rowfontcolor="#FFEB85"; $connid = mysql_connect ('localhost' , 'rastrono' , 'sinhosejar'); mysql_select_db ("rastrono_numbers"); $masterquery = "SELECT aname FROM Numbertable"; $aname=mysql_query($masterquery); while($row = mysql_fetch_array($aname)){ $aname2=$row['aname']; $query = "SELECT COUNT(fullname), aname, firstname, middlename, lastname FROM cardtable WHERE fullname REGEXP '\/[0-9]*)' AND aname = '$aname2'"; $sumtotal=mysql_query($query); while($row2 = mysql_fetch_array($sumtotal)){ $grandtotal= $row2['COUNT(fullname)']; $firstname=$row2['firstname']; $middlename=$row2['middlename']; $lastname=$row2['lastname']; $fuckinganame = $row2['aname']; $firstname=str_replace(" ^","",$firstname); $lastname=str_replace(" ^","",$lastname); $middlename=str_replace(" ^","",$middlename); $firstname=str_replace("^ ","",$firstname); $lastname=str_replace("^ ","",$lastname); $middlename=str_replace("^ ","",$middlename); $firstname= ucwords(strtolower($firstname)); $lastname= ucwords(strtolower($lastname)); $middlename= ucwords(strtolower($middlename)); if (rtrim(ltrim($firstname))=="Ja") {$firstname="JA";} if (rtrim(ltrim($firstname))=="Jb") {$firstname="JB";} if (rtrim(ltrim($firstname))=="Jc") {$firstname="JC";} if (rtrim(ltrim($firstname))=="Jd") {$firstname="JD";} if (rtrim(ltrim($firstname))=="Jr") {$firstname="JR";} if (rtrim(ltrim($firstname))=="Tj") {$firstname="TJ";} if ($lastname=="") {$lastname=$firstname;} $lastname="xz".$lastname; if (strpos($lastname,"Mc") !="") { $mcpos=strpos($lastname,"Mc"); $lettertoupper = substr($lastname,$mcpos+2,1); $lastname = substr_replace($lastname,strtoupper($lettertoupper),$mcpos+2,1); } $lastname=str_replace("xz","",$lastname); } if ($grandtotal > 0) { $i++; $playersfirstname[$i]= $firstname; $playersmiddlename[$i]=$middlename; $playersmiddlename[$i]= str_replace("triple","Triple",$playersmiddlename[$i]); $playerslastname[$i]=$lastname; $playerslastname[$i]= str_replace("#209;","ntilde;",$playerslastname[$i]); $playerslastname[$i]= str_replace("-astros","-Astros",$playerslastname[$i]); $numberedcards[$i] = $grandtotal; $playersaname[$i] = $aname2; } } if ($sortorder=="playerlastname") { array_multisort($playerslastname,SORT_ASC,$numberedcards,SORT_DESC,$playersfirstname,$playersmiddlename,$playersaname); $inputvalue="Click to Re-sort by Number of Cards"; } else { array_multisort($numberedcards,SORT_DESC,$playerslastname,SORT_ASC,$playersfirstname,$playersmiddlename,$playersaname); $inputvalue="Click to Re-sort by Player Last Name"; $sortorder = "numberofcards"; } echo "
\r\n"; for ($n=0;$n<$i/2;$n++) {echo "\r\n";} if ($trstring=="style=\"background-color:pink\"") {$trstring="";} else {$trstring="style=\"background-color:pink\"";} echo "
"; if ($playersfirstname[$n] == $playerslastname[$n]) {$playerslastname[$n]="";} if (($n+1) < 10) {$spacer="    ";} else {if (($n+1) < 100) {$spacer="  ";} else {$spacer="";}} echo $spacer; echo $n+1; if ($numberedcards[$n] < 10) {$nspacer="    ";} else {if ($numberedcards[$n]< 100) {$nspacer="  ";} else {$nspacer="";}} echo ". ".$playersfirstname[$n]." ".$playersmiddlename[$n]." ".$playerslastname[$n]." ".$nspacer.$numberedcards[$n]; $counter = $counter + $numberedcards[$n]; if (($n+1)%2==0) {$trstring="style=\"background-color:pink\"";} else {$trstring="";} echo "
"; for ($o=floor(($i+1)/2);$o<$i;$o++) {echo "\r\n";} if (($i%2) == 1) {echo "
"; if ($playersfirstname[$o] == $playerslastname[$o]) {$playerslastname[$o]="";} if (($o+1) < 10) {$spacer="    ";} else {if ($spacer < 100) {$spacer="  ";} else {$spacer="";}} echo $spacer; echo $o+1; if ($numberedcards[$o] < 10) {$ospacer="    ";} else {if ($numberedcards[$o]< 100) {$ospacer="  ";} else {$ospacer="";}} echo ". ".$playersfirstname[$o]." ".$playersmiddlename[$o]." ".$playerslastname[$o]." ".$ospacer.$numberedcards[$o]; $counter = $counter + $numberedcards[$o]; if ($o%2==0) {$trstring="style=\"background-color:pink\"";} else {$trstring="";} echo "
  ";} echo "
"; if ($sortorder=="playerlastname") {$sortorder="numberofcards";} else {$sortorder="playerlastname";} echo "

"; echo "

A Total of ".$counter." Numbered Cards From ".$i." Players

"; mysql_select_db ("rastrono_numbers"); $query = "SELECT COUNT(fullname) FROM cardtable WHERE fullname != ' ^'"; $result=mysql_query($query); while($row = mysql_fetch_array($result)){ $cardsum= $row['COUNT(fullname)']; } echo "

"; $playersquery="SELECT COUNT(aname) FROM Numbertable WHERE trim(aname) != ''"; $playertotal=mysql_query($playersquery); while($rowwhatever = mysql_fetch_array($playertotal)){ $playerstotal= $rowwhatever['COUNT(aname)'];} echo ""; echo ""; if ($sortorder=="playerlastname") {if ($i%2==0) {$median=$numberedcards[$i/2];} else {$median=($numberedcards[floor($i/2)]+$numberedcards[ceil($i/2)])/2;} echo "";} else {$topguy=max($numberedcards); $topguykey = array_search($topguy,$numberedcards); rsort($numberedcards); $middle = round(count($numberedcards) / 2); $total = $numberedcards[$middle-1]; echo "";} echo "
-- Of the ".number_format($cardsum)." cards in the Astroland collection, ".number_format($counter)."/".number_format($cardsum).", or 1 in ".number_format($cardsum/$counter,1).", are numbered
-- Of the ".number_format($playerstotal)." players in the Astroland collection, ".number_format($i)."/".number_format($playerstotal).", or 1 in ".number_format($playerstotal/$i,1).", have a numbered card
-- Among the ".number_format($i)." players in the Astroland collection with numbered cards, the average number of numbered cards per player
      is ".$i."/".$counter.", or ".number_format($counter/$i,1)."
-- That\'s skewed a little bit, because of ".$playersfirstname[0]." ".$playersmiddlename[0]." ".$playerslastname[0]." and ".$playersfirstname[1]." ".$playersmiddlename[1]." ".$playerslastname[1]." and the rest. The median as you can see is ".$median."
-- That\'s skewed a bit, because of ".$playersfirstname[$topguykey]." ".$playersmiddlename[$topguykey]." ".$playerslastname[$topguykey]." and the rest of the stars with the very most cards. The median for the ".$i." is ".$total."
"; mysql_close ($connid);


Astroland:
Search Engine Home Page Doubles For Sale or Trade Doubles Search Engine
Autographed Card Counter Beckett Low Breakdown Beckett High Breakdown Bowman Chrome Rainbow Finder
Bowman Chrome Worksheets Complete Sets Game Bat Card Counter Game-Used "Fabric" Card Counter
The Hundred Club Jersey-Numbered Numbereds Leaf Certified Cuts Worksheet Leaf Certified Mats Worksheets
Minor League Singles Minor League Teamsets Numbered Card Counter Parallel Want Finder
Topps Chrome Worksheets Upper Deck Heroes Worksheet Upper Deck Special F/X Worksheet Wantlist Search Engine
Cards by Year