Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.20 KB | None | 0 0
  1.     public function getScore($setone,$settwo,$getChallengerScore,$getOpponentScore,$fileChallengerData,$fileOpponentData,$matchID)
  2.     {
  3.         try
  4.         {
  5.             $stmt = $this->db->prepare("UPDATE matches SET `winner` = :setone, `looser` = :settwo, `winner_score` = :getChallengerScore, `looser_score` = :getOpponentScore, `challenger_blob` = :fileChallengerData, `opponent_blob` = :fileOpponentData WHERE `id` = :matchID");
  6.  
  7.             $stmt->bindParam(':setone', $setone);
  8.             $stmt->bindParam(':settwo', $settwo);
  9.             $stmt->bindParam(':getChallengerScore', $getChallengerScore);
  10.             $stmt->bindParam(':getOpponentScore', $getOpponentScore);
  11.             $stmt->bindParam(':fileChallengerData', $fileChallengerData);
  12.             $stmt->bindParam(':fileOpponentData', $fileOpponentData);
  13.             $stmt->bindParam(':matchID', $matchID);
  14.  
  15.             $stmt->execute(array(
  16.                 ':setone' => $setone,
  17.                 ':settwo' => $settwo,
  18.                 ':getChallengerScore' => $getChallengerScore,
  19.                 ':getOpponentScore' => $getOpponentScore,
  20.                 ':fileChallengerData' => $fileChallengerData,
  21.                 ':fileOpponentData' => $fileOpponentData,
  22.                 ':matchID' => $matchID
  23.             ));
  24.             var_dump($stmt);
  25.             return $stmt;
  26.         }
  27.         catch(PDOException $e)
  28.         {
  29.             echo $e->getMessage();
  30.         }    
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement