{sql:select * from her_enquiry
WHERE her_enquiry.rowid = @File number@
}
{subtable:
SELECT her_core.prn,
ifnull(her_core.name,' ') as name,
ifnull(her_core.desc_1,'-') as d1,
ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_core_site_type.period,''),', ',ifnull(her_core_site_type.type,''),'. Rank: ',ifnull(her_core_site_type.rank,'-')) SEPARATOR '[br]'),'') as t1,
ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_status.status,'None recorded '),' ',ifnull(her_status.reference,' '),' ',ifnull(her_status.grade,'')) SEPARATOR ', '),' ') as status1,
ifnull(GROUP_CONCAT(DISTINCT ifnull(geo_locations.ngr,'-')SEPARATOR ', '),' ') as ngr,
ifnull(GROUP_CONCAT(DISTINCT ifnull(geo_locations.url,'') SEPARATOR ', '),', ') as url
FROM her_core
JOIN her_enquiry_link_core on her_core.watprn=her_enquiry_link_core.watprn
LEFT JOIN geo_locations on geo_locations.watprn=her_core.watprn
LEFT JOIN her_core_site_type on her_core_site_type.watprn=her_core.watprn
LEFT JOIN her_status on her_status.watprn=her_core.watprn
WHERE her_enquiry_link_core.fileno=[rowid]
group by her_core.name limit 10000;
title:[b]PRN[/b] , prn , [b]NAME[/b] , name, [br],[b]NGR[/b] , ngr, [br],[b]TYPE [/b] , t1, [br],[b]DESCRIPTION[/b] , d1, [br],[b]STATUS[/b] , status1,[br],[b]ARCHWILIO URL [/b], url, }
{date("m.d.y (H:m)")} - HTML file produced from CPAT HER, CPAT file number {rowid}.
Clwyd-Powys Archaeological Trust, The Offices, Coed y Dinas, Welshpool, SY21 8RP.
tel (01938) 553670, email her@cpat.org.uk, website www.cpat.org.uk