View Single Post
  #12  
Old 10-27-2008, 06:50 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by AndMetal View Post
Next step, creating a query to migrate from the indexes to the skill IDs so we don't have to do it by hand.
Code:
SET @row = 0;
UPDATE altadv_vars a SET prereq_skill = COALESCE((SELECT p.skill_id FROM (SELECT a2.skill_id, @row := @row + 1 AS prereq_index_num FROM altadv_vars a2) AS p WHERE p.prereq_index_num = a.prereq_skill), 0) WHERE prereq_skill < 1000000;
I also had to make a slight change to the query so that it doesn't fubar archetype & class requirements (4294967295 & 4294967294):
Code:
COALESCE((SELECT prereq_index_num FROM (SELECT skill_id, @row := @row + 1 AS prereq_index_num FROM altadv_vars) AS p WHERE p.skill_id = a.prereq_skill), a.prereq_skill) AS prereq_skill_index
Because of the database changes needed, I'm going to hold off on committing this for now until everyone feels comfortable with making the switch.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote