コード例 #1
0
ファイル: data.php プロジェクト: jamiezyx/MorpheusPets
 /**
  * Add a species
  *
  * @param Species $species
  *
  * @return mixed|null
  */
 public function addSpecies($species)
 {
     $ret = null;
     $species_name = $species->getSpecies();
     $type = $species->getType();
     $stats = $species->getStats();
     $this->addSpeciesStatement->bind_param("sss", $species_name, $type, $stats);
     if ($this->addSpeciesStatement->execute()) {
         $ret = $this->dbConnection->last_insert_id();
     }
     return $ret;
 }