PHP expert |
|
aub:-)
SELECT p1.id, p1.naam, abs( p1.gbjaar - p2.gbjaar ) AS diff
FROM people p1, people p2
WHERE p2.id = ID_VAN_PERSOON AND p1.geslacht != p2.geslacht
GROUP BY diff, p1.id
SELECT p1.id, p1.naam, abs( p1.gbjaar - p2.gbjaar ) AS diff FROM people p1, people p2 WHERE p2.id = ID_VAN_PERSOON AND p1.geslacht != p2.geslacht GROUP BY diff, p1.id
|