SQL kód je napsán tak, bay byly k dispozice přímé hypertextové odkazy na stránku otce, matky nebo rodiny. Vypadá takto:
SELECT
concat('<a href="familygroup.php?familyID=',f.familyid, '&tree=', f.gedcom,'">', f.familyid,'</a>') as familyid,
concat('<a href="familygroup.php?familyID=',f.familyid, '&tree=', f.gedcom,'">', if(isnull(h.lastname), ' ',h.lastname),'/ ',if(isnull(w.lastname), ' ',w.lastname),'</a>') as FamilyName,
count(c.personid) as Size,
group_concat(ch.firstname order by ordernum separator ', ') as Children,
concat('<a href="getperson.php?personID=',f.husband,'&tree=', f.gedcom,'">',h.firstname,' ',h.lastname,'</a>') as Husband,
concat('<a href="getperson.php?personID=',f.wife,'&tree=', f.gedcom,'">',w.firstname,' ',w.lastname,'</a>') as Wife,
f.marrdate, f.marrplace, f.branch as Branch FROM tng_families as f
left join tng_people as h on f.gedcom = h.gedcom and f.husband = h.personid
left join tng_people as w on f.gedcom=w.gedcom and f.wife = w.personid
left join tng_children as c on f.gedcom=c.gedcom and f.familyid = c.familyid
left join tng_people as ch on f.gedcom=ch.gedcom and c.personid = ch.personid
WHERE f.gedcom = 'strom'
group by c.gedcom,c.familyid
order by Size desc, h.lastname,w.lastname,h.firstname, w.firstname
Pozor! Ve třetím řádku odspodu si musíte napsat namísto strom vlastní název stromu, aby report správně fungoval.
Považuji tento report za jeden z nej !