prepare(" SELECT slot, effect, value, enchant, grind FROM artifact_effect WHERE artifact = :artifact AND slot = :slot; "); $statement->bindValue(':artifact', $artifact, SQLITE3_INTEGER); $statement->bindValue(':slot', $slot, SQLITE3_INTEGER); $r = $statement->execute()->fetchArray(SQLITE3_ASSOC); if ($r){ $this->effect = $r["effect"]; $this->value = $r["value"]; $this->enchant = $r["enchant"]; $this->grind = $r["grind"]; $statement = $db->prepare(" SELECT name FROM k_artifact_effect WHERE id = :id; "); $statement->bindValue(':id', $this->effect, SQLITE3_INTEGER); $r = $statement->execute()->fetchArray(SQLITE3_ASSOC); if ($r){ $this->name = str_replace("{}", $this->value, $r["name"]); } } } } ?>