Hi PFC
Thanks for this! It has sped up complete - now in fact there is no delay!
A few tweaks had to be made to the code ; here it is:
select breakdown.alignment, sum(cnt) as num FROM
( (select alignment.name as class, count(1) as cntfrom weapons,alignmentwhere weapons.level < (select level_id from
userswhere uid =
$userid)and cost = 0and alignment.id = weapons.align_idgroup by alignment.name)
UNION ALL
select b.class as class, count(1) as cntfrom weapons w, user_weapons uu, alignment bwhere tu.weaponid = uu.weaponidand
uu.user_id= ($userid)and b.id = tu.idgroup by b.class ) as breakdown
group by breakdown.class;
Essentially you had skipped a few brackets and I had forgotten to note one
of the tables. It works!
Thanks a lot!!
Mike