コード例 #1
0
ファイル: data.php プロジェクト: jamiezyx/MorpheusPets
 /**
  * Update a pet by id
  *
  * @param Pet $pet
  *
  * @return bool
  */
 public function updatePet($pet)
 {
     $id = $pet->getId();
     $name = $pet->getName();
     $experience = $pet->getExperience();
     $brawn = $pet->getBrawn();
     $guts = $pet->getGuts();
     $essence = $pet->getEssence();
     $speed = $pet->getSpeed();
     $focus = $pet->getFocus();
     $grit = $pet->getGrit();
     $active = intval($pet->isActive());
     $this->updatePetStatement->bind_param("siiiiiiiii", $name, $experience, $brawn, $guts, $essence, $speed, $focus, $grit, $active, $id);
     return $this->updatePetStatement->execute();
 }