
 Сообщение от 
Arthur =SF=TopAce
					
				 
				Да вот кто его убивает
<?
$strtitle="Pilot update result";
$strimage="img/VAF_main_tank.jpg";
$strbackground="img/VAF_background.jpg";
include("pagehead.inc");
include("mysql.inc");
$sql=new MySQL();
$sql1=new MySQL();
$query="Select id from pilots where (callsign like \"%Jager%\" or HLname like \"%Jager%\")  and squadronid=46";
  if(!($sql->ExecQuery($query))) 
  {
        echo "error in query";
	break;
  }
//echo "<br>".$query;
while($pilot=$sql->FetchArray())
{
//echo "<br>".$pilot['id'];
$arrayQuery  = array(
  "Delete from deadpilots where id=".$pilot['id'],
  "Delete from pilots where id=".$pilot['id'],
  "Update killboard set killerid=0 where killerid=".$pilot['id'],
  "Update killboard set killedid=0 where killedid=".$pilot['id'],
  "Update missionstrings set pilotid=0 where pilotid=".$pilot['id'],
  "Update squadrons set pilotcount=pilotcount-1 where id=".$pilot['id']
  );
 $del=true;
for($i=0; $i< count($arrayQuery); $i++)
{
  $sql1->setQuery($arrayQuery[$i]);
 // echo "<br>".$arrayQuery[$i];
  if(!$sql1->Exec()) 
  {
    $del = false;
	break;
  }
}
}
if ( $del )
{
echo("<p class=\"warn\">You successfuly delete JAGERS</p>");
}
else
{
echo "Pilot delete unsuccessful!";
}
include("pagebot.inc");
?>