View Single Post
  #4  
Old 03-05-2013, 06:31 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

You can get the next available with this sql if you like, not sure you would want to automate it though...If you did you would end up having to query the db to discover where it put your recipes anyways..

Code:
SELECT t1.id + 1
FROM tradeskill_recipe t1
WHERE NOT EXISTS (
    SELECT * 
    FROM tradeskill_recipe t2
    WHERE t2.id = t1.id + 1
)
LIMIT 1
Me personally I put all my customs after the last used id of a table with some cushion...Then I can insert in a given range. I like to have a record of what my sql is doing, and automating takes that away..If you are using excel then you can easily build an sql Insert query from it..

And c0ncrete, nice sql, i went a different route to remove my spells from merchants and loot drops but this is very cool, just add this to get it imported into excel if on windows(prob alread know this)

Code:
INTO OUTFILE 'c:/reneq/non_merchant_spells.csv'
FIELDS TERMINATED BY '\,'
LINES TERMINATED BY '\n';
Reply With Quote