$sql = "
SELECT G.level AS g_level, G.sp_cost, S.id, S.icon,
S.level AS s_level, S.active, S.magic, S.mp_consume, S.hp_consume,
S.range, S.skill_time, S.reuse_delay, S.effect, S.magic_level,
N.name, N.description
FROM GainSkills as G
JOIN Skills as S
ON (
( G.class_id = $class_infoїid] $ancestors )
AND G.level >= $class_infoїmin_level]
AND G.level <= $class_infoїmax_level]
AND G.skill_id = S.id
AND G.skill_level = S.level
)
LEFT JOIN SkillNames as N
ON ( S.id = N.id AND S.level = N.level AND N.language = '$l2dp_lang' )
ORDER BY G.level, S.active, N.name, S.level;";
Hi thanks for the reply, that part does look a little weird. Well the original author gave his code away and right now, I'm just shiffting through them trying to get it to work. It was originally meant for postgre and I'm trying to get it to work on mysql.
This portion of the code has the $ancestors variable.