//------------------------AllGoalKeepers------------------------------------
$result = $client->AllGoalKeepers(array("sCountryName" => ""));
$Allgoalk = $result->AllGoalKeepersResult->string;
foreach ($Allgoalk as $k => $v) {
    $sql = "UPDATE player SET position='goal_keeper'WHERE player_name='{$v}'";
    mysqli_query($con, $sql);
}
//------------------------AllForwards------------------------------------
$result = $client->AllForwards(array("sCountryName" => ""));
$AllForwards = $result->AllForwardsResult->string;
foreach ($AllForwards as $k => $v) {
    $sql = "UPDATE player SET position='forward'WHERE player_name='{$v}'";
    mysqli_query($con, $sql);
}
//------------------------AllMidFields------------------------------------
$result = $client->AllMidFields(array("sCountryName" => ""));
$AllMidFields = $result->AllMidFieldsResult->string;
foreach ($AllMidFields as $k => $v) {
    $sql = "UPDATE player SET position='mid_field'WHERE player_name='{$v}'";
    mysqli_query($con, $sql);
}
//---------------------------TeamsCompeteList---------------------------------
$team = $client->TeamsCompeteList(array());
$teamresult = $team->TeamsCompeteListResult->tTeamCompete;
foreach ($teamresult as $k => $v) {
    $arr = $v->CoachInfo;
    $x = $arr->TeamInfo;
    $sql = "insert into team(team_id,team_name,Country_flag,Country_flag_Large,wikipedia_URL,coach,competed_count,won_count) values({$x->iId},'{$x->sName}','{$x->sCountryFlag}','{$x->sCountryFlagLarge}','{$x->sWikipediaURL}','{$arr->sName}',{$v->iCompeted},{$v->iWon})";
    if (!mysqli_query($con, $sql)) {
        echo mysqli_error($con);
        die(mysqli_error($con));