ID;

$S_ID = 21;

$sql = “SELECT admin FROM wp_users WHERE ID = $Member_ID”;
$result = mysqli_query($link, $sql) or die(“A MySQL error has occurred 16.
Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
extract($row);

if ($admin == 1)
{

if(empty($Case))

{ $Case = 0; }

if(!empty($_POST))

{ $Case = $_POST[“Case”]; }

$sql = “SELECT * FROM series s INNER JOIN colors WHERE s.Series_ID = $S_ID”;
$result = mysqli_query($link, $sql) or die(“A MySQL error has occurred 16.
Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
extract($row);
?>

Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());
$row1 = mysqli_fetch_array($result1, MYSQLI_ASSOC);
extract($row1);

echo “

“;
echo “

“;

echo “

“;
echo “

$Series_Name – $Series_Year
Last Race – $Event_Date – $Event_Name

“;

?>

Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC))
{
extract($row);

$BPts = $BPts_Win + $BPts_Laps + $BPts_MLaps + $BPts_Inc;
$Total = $Pts + $BPts + $BPts_IncN;

if($Behind==”0.000″)
{
$Behind = “-“;
}
?>


Fin Str Num Driver Int Laps Led Inc Pts Bns Pen Total Status


Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC))
{
extract($row);

$ds_Starts = $ds_Starts + 1;
$ds_Laps_Led = $ds_Laps_Led + $Laps_Led;
$ds_Race_Pts = $ds_Race_Pts + $Pts;
$ds_Rookie_Pts = $ds_Rookie_Pts + $Rpts;
$ds_BPts_Win = $ds_BPts_Win + $BPts_Win;
$ds_BPts_Laps = $ds_BPts_Laps + $BPts_Laps;
$ds_BPts_MLaps = $ds_BPts_MLaps + $BPts_MLaps;
$ds_BPts_Inc = $ds_BPts_Inc + $BPts_Inc;
$ds_BPts_IncN = $ds_BPts_IncN + $BPts_IncN;
$ds_Prov = $ds_Prov + $Prov;
$ds_Inc = $ds_Inc + $Inc;
$ds_Rookie_Pts = $ds_Rookie_Pts + $RPts;
$ds_Total_Pts = $ds_Total_Pts + $Pts + $BPts_Win + $BPts_Laps + $BPts_MLaps + $BPts_Inc + $BPts_IncN;

if($Finish == 1)
{
$ds_Wins++;
}

if($Finish <= 5) { $ds_T5++; } if($Finish <= 10) { $ds_T10++; } $sql1="UPDATE driver_stats SET ds_Starts='$ds_Starts',ds_Wins='$ds_Wins',ds_T5='$ds_T5',ds_T10='$ds_T10',ds_Laps_Led='$ds_Laps_Led',ds_Total_Pts='$ds_Total_Pts',ds_Race_Pts='$ds_Race_Pts',ds_Rookie_Pts='$ds_Rookie_Pts',ds_BPts_Win='$ds_BPts_Win',ds_BPts_Laps='$ds_BPts_Laps',ds_BPts_MLaps='$ds_BPts_MLaps',ds_BPts_Inc='$ds_BPts_Inc',ds_BPts_IncN='$ds_BPts_IncN',ds_Prov='$ds_Prov',ds_Inc='$ds_Inc' WHERE Driver_ID = '$Driver_ID' and Series_ID = '$Series_ID'"; mysqli_query($link, $sql1) or die("A MySQL error has occurred 30.
Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());

}

##########################################

$sql = “SELECT * FROM driver_stats ds INNER JOIN drivers d ON d.Driver_ID = ds.Driver_ID INNER JOIN driver_detail dd ON dd.Driver_ID = ds.Driver_ID WHERE ds.Series_ID = $S_ID AND ds.ds_Total_Pts > 0 AND dd.Series_ID = $S_ID ORDER BY ds.ds_Total_Pts DESC, ds.ds_Wins DESC, ds.ds_T5 DESC, ds.ds_T10 DESC, ds.ds_Laps_Led DESC”;
$result = mysqli_query($link, $sql) or die(“A MySQL error has occurred 51.
Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC))
{
extract($row);

$Pos++;

if($Prev_Pts==$ds_Total_Pts)
{
$DPos = $Prev_Pos;
}
else
{
$DPos = $Pos;
}

$Prev_Pos = $DPos;
$Prev_Pts = $ds_Total_Pts;

$sql = “UPDATE driver_stats SET ds_Current=’$DPos’,ds_Prev=’$ds_Current’ WHERE Driver_ID = $Driver_ID”;
mysqli_query($link, $sql) or die(“A MySQL error has occurred 30.
Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());

}

##########################################

$sql = “UPDATE events SET Results_Processed=’1′ WHERE Event_ID = $Event_ID”;
mysqli_query($link, $sql) or die(“A MySQL error has occurred 30.
Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());

?>

“>Num “>Starts “>Top 5 “>Pts “>Pen “>Inc 0 AND dd.Series_ID = $S_ID ORDER BY ds.ds_Total_Pts DESC, ds.ds_Wins DESC, ds.ds_T5, ds.ds_T10 DESC, ds.ds_Laps_Led DESC”;
$result = mysqli_query($link, $sql) or die(“A MySQL error has occurred 51.
Your Query: ” . $your_query . “
Error: (” . mysql_errno() . “) ” . mysql_error());
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC))
{
extract($row);

$BPts = $ds_BPts_Win + $ds_BPts_Laps + $ds_BPts_MLaps + $ds_BPts_Inc;
$PPts = $ds_BPts_IncN + $ds_PPts;
$Pos++;

$Behind = $ds_Total_Pts – $Leader;
$BChase = $ds_Total_Pts – $Chase_Cut;

if($Pos==”1″)
{
$Leader = $ds_Total_Pts;
$Behind = “-“;
}

if($Number>1000)
{
$Number = ltrim($Number,’99’);
}

?>

“> Return to League Management