I figured out how to display a list of duplicate values from an individual database table. However, I haven't yet figured out how to display duplicates in a series of tables.
Examples of the kinds of duplicates I might expect include URL = George_Washington (the name of a U.S. president displayed at MySite/People/George_Washington and a ship @ MySite2/Topics/George_Washington) and URL = Gary_Locke (a person discussed in two articles at MySite/People/Gary_Locke and MySite2/People_Gary_Locke).
In summary, I simply want to display a list of every value in the field URL (which corresponds to the fields Taxon and Name). It would be really cool if I could display a list of URL's with their respective sites and sections, like this:
George_Washington | MySite | People
George_Washington | MySite2 | Topics
But if all I can do is display a simple list of URL's, that would be fine. I'm going to be doing a lot of work with duplicates, and I need to learn some tricks for manipulating them. Thanks.
$stm = $pdo->prepare("SELECT 'GZ' AS GSiteID, NULL as Site, 'Life' AS GSection, GZL.Taxon AS URL
FROM gz_life GZL WHERE GZL.Taxon = :MyURL
SELECT 'All' AS GSiteID, NULL as Site, 'World' AS GSection, GG.Name AS URL FROM gw_geog GG WHERE GG.Name = :MyURL
SELECT 'GS' AS GSiteID, NULL as site, 'World' AS GSection, GS.URL FROM gs GS WHERE GS.URL = :MyURL
SELECT 'PX' AS GSiteID, Site, 'People' AS GSection, Ppl.URL FROM people Ppl WHERE Ppl.URL = :MyURL");