Kan zoekvraag niet uitvoeren: SELECT p.ID, p.personID, lastname, lnprefix, firstname, p.living, p.private, p.branch, nickname, prefix, suffix, nameorder, title, birthplace, birthdate, deathplace, deathdate, altbirthdate, altbirthplace, burialdate, burialplace, p.gedcom, treename , families1.wife as wife, families2.husband as husband FROM tng_people AS p LEFT JOIN tng_families AS families1 ON (p.gedcom = families1.gedcom AND p.personID = families1.husband ) LEFT JOIN tng_families AS families2 ON (p.gedcom = families2.gedcom AND p.personID = families2.wife ) LEFT JOIN tng_trees on p.gedcom = tng_trees.gedcom WHERE ( p.firstname LIKE "%Engebret%") AND p.gedcom="voorouders" ORDER BY p.lastname, p.firstname, IF(p.birthdatetr, p.birthdatetr, p.altbirthdatetr) LIMIT 50