Changes in histories with people

From TNG_Wiki
Jump to navigation Jump to search

Documents/histories changed within the last 90 days (listing *with* linked individuals)

Copy and paste the text between the lines into the section below "OR Leave Display, Criteria and Sort fields blank and enter direct SQL SELECT statement here:" and give it the title you think is appropriate


SELECT dc.mediaID, description, notes, p.personID, p.lastname, p.firstname, dc.changedate, p.living, p.gedcom
FROM tng_media AS dc
LEFT JOIN tng_medialinks AS dcl ON dc.mediaID = dcl.mediaID
LEFT JOIN tng_people AS p ON dcl.personID = p.personID
WHERE DATE_SUB( CURDATE( ) , INTERVAL 90
DAY ) <= dc.changedate
AND dc.mediatypeID = "histories"
ORDER BY dc.changedate DESC