I'm being given an error by mysql, "Warning: mysqli_connect() expects parameter 1 to be string, object given in /storage/...", the relevant lines are
$code = $this->GenerateCode($num);
$enCoded = password_hash($code, PASSWORD_BCRYPT);
$query = "INSERT INTO `vaults` " .
"(`Alive`, `Contents`, `Code`, `digits`, `Winning_Player_ID`, `Won_Date`, `debug`)" .
"VALUES " .
"(CONV('1', 2, 10) + 0, '0', '{$enCoded}', '$num', NULL, NULL, '{$code}')";
Followed by the mysqli_connect($this->db, $query).