mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
DB/MySQL (#219)
* fixed usage of field name 'rank' which became a keyword in MySQL 8
This commit is contained in:
@@ -616,7 +616,7 @@ class RemoteProfileList extends ProfileList
|
||||
foreach ($talentLookup as $realm => $chars)
|
||||
$talentLookup[$realm] = DB::Characters($realm)->selectCol('SELECT guid AS ARRAY_KEY, spell AS ARRAY_KEY2, talentGroup FROM character_talent ct WHERE guid IN (?a)', array_keys($chars));
|
||||
|
||||
$talentSpells = DB::Aowow()->select('SELECT spell AS ARRAY_KEY, tab, rank FROM ?_talents WHERE class IN (?a)', array_unique($talentSpells));
|
||||
$talentSpells = DB::Aowow()->select('SELECT spell AS ARRAY_KEY, tab, `rank` FROM ?_talents WHERE class IN (?a)', array_unique($talentSpells));
|
||||
|
||||
if ($distrib !== null)
|
||||
{
|
||||
|
||||
@@ -109,7 +109,7 @@ class GuildPage extends GenericPage
|
||||
// statistic calculations here
|
||||
|
||||
// smuggle the guild ranks into the html
|
||||
if ($ranks = DB::Aowow()->selectCol('SELECT rank AS ARRAY_KEY, name FROM ?_profiler_guild_rank WHERE guildId = ?d', $this->subjectGUID))
|
||||
if ($ranks = DB::Aowow()->selectCol('SELECT `rank` AS ARRAY_KEY, name FROM ?_profiler_guild_rank WHERE guildId = ?d', $this->subjectGUID))
|
||||
$this->extraHTML = '<script type="text/javascript">var guild_ranks = '.Util::toJSON($ranks).';</script>';
|
||||
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ SqlGen::register(new class extends SetupScript
|
||||
DB::Aowow()->query('UPDATE ?_spell SET cuFlags = cuFlags | ?d WHERE id IN (?a)', CUSTOM_DISABLED, $disables);
|
||||
|
||||
// apply spell ranks (can't use skilllineability.dbc, as it does not contain ranks for non-player/pet spells)
|
||||
$ranks = DB::World()->selectCol('SELECT first_spell_id AS ARRAY_KEY, spell_id AS ARRAY_KEY2, rank FROM spell_ranks');
|
||||
$ranks = DB::World()->selectCol('SELECT first_spell_id AS ARRAY_KEY, spell_id AS ARRAY_KEY2, `rank` FROM spell_ranks');
|
||||
foreach ($ranks as $firstSpell => $sets)
|
||||
{
|
||||
// apply flag: SPELL_CU_FIRST_RANK
|
||||
@@ -417,7 +417,7 @@ SqlGen::register(new class extends SetupScript
|
||||
DB::Aowow()->query('UPDATE ?_spell SET learnedAt = ?d WHERE id = ?d', $reqSkill, $spell);
|
||||
|
||||
// calc reqSkill for gethering-passives (herbing, mining, skinning) (on second thought .. it is set in skilllineability >.<)
|
||||
$sets = DB::World()->selectCol('SELECT spell_id AS ARRAY_KEY, rank * 75 AS reqSkill FROM spell_ranks WHERE first_spell_id IN (?a)', [55428, 53120, 53125]);
|
||||
$sets = DB::World()->selectCol('SELECT spell_id AS ARRAY_KEY, `rank` * 75 AS reqSkill FROM spell_ranks WHERE first_spell_id IN (?a)', [55428, 53120, 53125]);
|
||||
foreach ($sets as $spell => $reqSkill)
|
||||
DB::Aowow()->query('UPDATE ?_spell SET learnedAt = ?d WHERE id = ?d', $reqSkill, $spell);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user