/**
  * Updates Match by ID
  * @param ResultSet $result
  * @param User $user
  * @return Match
  */
 protected function insertUserIDifMatchExists($result, $user)
 {
     $match = new Match();
     $match->exchangeArray($result->current());
     $sql = new Sql($this->dbAdapter);
     $update = $sql->update('tblmatch');
     $update->where(array('matchID = ?' => $match->getID()));
     //Updates User1 or User2 depending on which is empty
     if ($match->getUser1()) {
         $update->set(array('User2' => $user->getID(), 'User2ELO' => $user->getELO()));
     } else {
         $update->set(array('User1' => $user->getID(), 'User1ELO' => $user->getELO()));
     }
     $stmt = $sql->prepareStatementForSqlObject($update);
     $stmt->execute();
     //return updated Match
     return $this->getMatch($match->getID());
 }