All pastes #94825 Raw Edit

Unnamed

public text v1 · immutable
#94825 ·published 2006-07-21 15:14 UTC
rendered paste body
for ($trainercnt=0;$trainercnt<mysql_num_rows($trainerlst);$trainercnt++) {
$trainersinfo=mysql_fetch_row($trainerlst);
//$jockeysname=$jockeysinfo[0];
$tot1=mysql_query("select raceno from bracetra where pos='1' and center='$center' and trcode='$trainersinfo[0]';");
$tot1place=mysql_num_rows($tot1);
$tot2=mysql_query("select raceno from bracetra where pos='2' and center='$center' and trcode='$trainersinfo[0]';");
$tot2place=mysql_num_rows($tot2);
$tot3=mysql_query("select raceno from bracetra where pos='3' and center='$center' and trcode='$trainersinfo[0]';");
$tot3place=mysql_num_rows($tot3);
$tot4=mysql_query("select raceno from bracetra where pos='4' and center='$center' and trcode='$trainersinfo[0]';");
$tot4place=mysql_num_rows($tot4);
$totmt=mysql_query("select raceno from bracetra where pos <> '0' and center='$center' and trcode='$trainersinfo[0]';");
$totmounts=mysql_num_rows($totmt);
$fwon=mysql_query("select raceno from bracetra where pos='1' and center='$center' and fav='1' and trcode='$trainersinfo[0]';"$
$favwon=mysql_num_rows($fwon);
$flst=mysql_query("select raceno from bracetra where pos > '1' and center='$center' and fav='1' and trcode='$trainersinfo[0]'$
$favlost=mysql_num_rows($flst);
$fwon2=mysql_query("select raceno from bracetra where pos='1' and center='$center' and fav='2' and trcode='$trainersinfo[0]';$
$favwon2=mysql_num_rows($fwon2);
$nfwon=mysql_query("select raceno from bracetra where pos='1' and center='$center' and fav > '2' and trcode='$trainersinfo[0]$
$nfavwon=mysql_num_rows($nfwon);
$trainersname=mysql_query("select trname from trmaster where trcode='$trainersinfo[0]';");
$trainersname=mysql_fetch_row($trainersname);
$trainername=$trainersname[0];


$pos1arr[$trainercnt]=$tot1place;
$pos2arr[$trainercnt]=$tot2place;
$pos3arr[$trainercnt]=$tot3place;
$pos4arr[$trainercnt]=$tot4place;
$totmtarr[$trainercnt]=$totmounts;
$favwonarr[$trainercnt]=$favwon;
$favlostarr[$trainercnt]=$favlost;
$favwon2arr[$trainercnt]=$favwon2;
$nfavwonarr[$trainercnt]=$nfavwon;
$trcodearr[$trainercnt]=$trainersinfo[0];
$tnamearr[$trainercnt]=$trainername;

//echo $jnamearr[0];
}
array_multisort($pos1arr,SORT_NUMERIC, SORT_DESC,
                $pos2arr,SORT_NUMERIC, SORT_DESC,
                $pos3arr,SORT_NUMERIC, SORT_DESC,
                $pos4arr,SORT_NUMERIC, SORT_DESC,
                $totmtarr,SORT_NUMERIC, SORT_DESC,
                $favwonarr,SORT_NUMERIC, SORT_DESC,
                $favlostarr,SORT_NUMERIC, SORT_DESC,
                $favwon2arr,SORT_NUMERIC, SORT_DESC,
                $nfavwonarr,SORT_NUMERIC, SORT_DESC,
                $trcodearr,SORT_STRING, SORT_ASC,
                $tnamearr,SORT_STRING, SORT_ASC);