EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Tools (https://www.eqemulator.org/forums/forumdisplay.php?f=593)
-   -   Show All Player Useable Spells By Level Query (https://www.eqemulator.org/forums/showthread.php?t=40162)

Uleat 11-06-2015 10:48 PM

Show All Player Useable Spells By Level Query
 
This arose from an exercise in futility - if you find it useful...

Code:

SET @sl = '1'; -- spell level
SET @qstr = CONCAT('SELECT \'', @sl, '\' level, `id`, `name`, `targettype` target_type, `SpellAffectIndex` spell_effect_index FROM `spells_new` WHERE \'', @sl, '\' IN (', (SELECT GROUP_CONCAT(CONCAT('`',`COLUMN_NAME`,'`') ORDER BY `ORDINAL_POSITION` SEPARATOR ',') FROM `information_schema`.`COLUMNS` WHERE (`table_schema` = DATABASE() AND `TABLE_NAME` = 'spells_new' AND `COLUMN_NAME` LIKE 'classes%')), ') ORDER BY `name`');
PREPARE stmt FROM @qstr;
EXECUTE stmt;


Shin Noir 01-25-2016 03:26 AM

I just used this, btw, it's useful and handy.


All times are GMT -4. The time now is 02:51 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.