Jump to content
TNG Community
fluffy82

All places

Recommended Posts

fluffy82

Something I miss is an alphabetical list of all places.

The existing list only shows the largest ones (eg. England), then you click in that to get the counties, then you can click on one county to get all cities within etc.

I would love a list with all used places, regardless of the place level. Like you can see in the admin pages when editing places.

 

Tom

Share this post


Link to post
Share on other sites
manofmull

Tom

I used the code from the Places and Events report and just changed the order to places first.

You'll need to change "*" (asterisk between quotes) to your tree ID (not tree name)

SELECT id, pl.gedcom,
pl.place, notes, concat('<a href="placesearch.php?psearch=',replace(pl.place,' ','+'), '">', evcount, '</a>') as eventcount
FROM tng_places as pl
join
( select gedcom, place, count(*) as evcount from
( SELECT gedcom, birthplace AS place
FROM `tng_people`
WHERE gedcom = '*'
UNION all SELECT gedcom, altbirthplace
FROM `tng_people`
WHERE gedcom = '*'
UNION all SELECT gedcom, marrplace
FROM `tng_families`
WHERE gedcom = '*'
UNION all SELECT gedcom, deathplace
FROM `tng_people`
WHERE gedcom = '*'
UNION all SELECT gedcom, burialplace
FROM `tng_people`
WHERE gedcom = '*'
UNION all SELECT gedcom, eventplace
FROM tng_events
WHERE gedcom = '*'

) as p group by gedcom, place

) as plc using ( gedcom, place )

order by pl.place, evcount desc, gedcom

Share this post


Link to post
Share on other sites
fluffy82

Ah, I never thought of creating a report to do that. Silly me.
I was thinking more along the lines of having a page (php) similar to the alphabetic lists of surnames and first names. But this is a good solution too.

Thanks!
Tom

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×