SHARE
TWEET

Untitled

a guest Aug 12th, 2017 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $statement = $connection->prepare("INSERT INTO $database.$hero" . "_avg
  2.        (internal_ID, power_score, kills, deaths, guardian_damage, wins, losses, kda, wounds_given, summons, damage_dealt, healing_given, assists, time_played, damage_soaked, total_games, medals_earned, motiga_skill, rank)
  3.        VALUES (:internal_ID, :power_score, :kills, :deaths, :guardian_damage, :wins, :losses, :kda, :wounds_given, :summons, :damage_dealt, :healing_given, :assists, :time_played, :damage_soaked, :total_games, :medals_earned, :motiga_skill, :rank)
  4.        ON DUPLICATE KEY UPDATE power_score = :power_score, kills = :kills, deaths = :deaths, guardian_damage = :guardian_damage, wins = :wins, losses = :losses, kda = :kda, wounds_given = :wounds_given, summons = :summons, damage_dealt = :damage_dealt, healing_given = :healing_given, assists = :assists, time_played = :time_played, damage_soaked = :damage_soaked, total_games = :total_games, medals_earned = :medals_earned, motiga_skill = :motiga_skill, rank = :rank;");
  5.         //print_r($statement);
  6.         $statement->bindValue(':interal_ID', $username, PDO::PARAM_STR);
  7.         $statement->bindValue(':power_score', $data[$hero]['avg']['power_score'], PDO::PARAM_INT);
  8.         $statement->bindValue(':kills', $data[$hero]['avg']['kills'], PDO::PARAM_INT);
  9.         $statement->bindValue(':deaths', $data[$hero]['avg']['deaths'], PDO::PARAM_INT);
  10.         $statement->bindValue(':guardian_damage', $data[$hero]['avg']['guardian_damage'], PDO::PARAM_INT);
  11.         $statement->bindValue(':wins', $data[$hero]['avg']['wins'], PDO::PARAM_INT);
  12.         $statement->bindValue(':losses', $data[$hero]['avg']['losses'], PDO::PARAM_INT);
  13.         $statement->bindValue(':kda', $data[$hero]['avg']['kda'], PDO::PARAM_INT);
  14.         $statement->bindValue(':wounds_given', $data[$hero]['avg']['wounds_given'], PDO::PARAM_INT);
  15.         $statement->bindValue(':summons', $data[$hero]['avg']['summons'], PDO::PARAM_INT);
  16.         $statement->bindValue(':damage_dealt', $data[$hero]['avg']['damage_dealt'], PDO::PARAM_INT);
  17.         $statement->bindValue(':healing_given', $data[$hero]['avg']['healing_given'], PDO::PARAM_INT);
  18.         $statement->bindValue(':assists', $data[$hero]['avg']['assists'], PDO::PARAM_INT);
  19.         $statement->bindValue(':time_played', $data[$hero]['avg']['time_played'], PDO::PARAM_INT);
  20.         $statement->bindValue(':damage_soaked', $data[$hero]['avg']['damage_soaked'], PDO::PARAM_INT);
  21.         $statement->bindValue(':total_games', $data[$hero]['avg']['total_games'], PDO::PARAM_INT);
  22.         $statement->bindValue(':medals_earned', $data[$hero]['avg']['medals_earned'], PDO::PARAM_INT);
  23.         $statement->bindValue(':motiga_skill', $data[$hero]['avg']['motiga_skill'], PDO::PARAM_INT);
  24.         $statement->bindValue(':rank', $data[$hero]['avg']['rank'], PDO::PARAM_INT);
  25.         prettyprint($statement);
  26.         $debug = $statement->debugDumpParams();
  27.         //prettyprint($debug);
  28.         $statement->execute();
RAW Paste Data
Top