Maintenance - Pooled Places with no Events

From TNG_Wiki
Revision as of 08:20, 26 February 2014 by KenRoy (talk | contribs) (new report when using Pooled Places)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Purpose

This article shows you how you can create an Admin Report that lists all pooled places not linked to any event.

Creating the Report

  • In Admin/Reports select the 'Add New' tab.
  • Enter a Report Name and Description:

Places-NewReport.jpg

  • Select the 'No' radio button against 'Active' (this ensures the report is viewable only by the system administrator).
  • Copy the SQL code listed below and paste in the last text box (above the 'Save Report' button).

File:Places-SQLcodebox4.jpg

  • Save the Report.

SQL Code

SELECT id, gedcom, concat('<a
href=admin_places.php?tree=',gedcom,'&searchstring=',REPLACE(place,'
','%20'),'&exactmatch=yes&findplace=1&newsearch=1>',place,'</a>') as place,
longitude, latitude, notes 
FROM tng_places 
WHERE place 
IN 
( SELECT pl.place FROM tng_places AS pl 
LEFT JOIN 
( 
SELECT birthplace AS place FROM tng_people 
UNION 
SELECT altbirthplace FROM tng_people 
UNION 
SELECT baptplace FROM tng_people
UNION 
SELECT deathplace FROM tng_people
UNION 
SELECT burialplace FROM tng_people 
UNION 
SELECT marrplace FROM tng_families
UNION 
SELECT divplace FROM tng_families 
UNION 
SELECT eventplace FROM tng_events 
) AS p 
USING ( place ) 
WHERE  isnull( p.place ) )

Viewing and Using the Report

After saving the report changes, click the 'Test' button. The resulting report should look like this:

File:Places-PooledReportResults.jpg


Related Links

Maintenance - Places with no maps

Maintenance - Places with no Events

Maintenance - Pooled Places with no Events

Maintenance - Places with identical geocodes

Maintenance - Places - Zoom & Place Levels

Places - Merging

Pooling Places


Acknowledgments