{sql:select * from her_project
WHERE her_project.rowid = @File number@
}
 

 

 

 

 

{subtable:
SELECT her_core.prn as id,
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_condition.condition,''),'',ifnull(her_condition.condesc,' '),'' ,ifnull(her_condition.eventprn,' '),' ',ifnull(her_condition.compiledon,' ')) SEPARATOR '[br]'),'') as c1,

 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 concat(ifnull(geo_locations.ngr,'-')) SEPARATOR ', '),' ') as ngr,

 ifnull(GROUP_CONCAT(DISTINCT concat(ifnull(her_xrefs.xref_type,'None recorded'),' ',ifnull(her_xrefs.xref,'')) SEPARATOR ', '),', ') as xref

FROM her_core

JOIN her_project_link on her_core.watprn=her_project_link.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_condition on her_condition.watprn=her_core.watprn
LEFT JOIN her_status on her_status.watprn=her_core.watprn

LEFT JOIN her_xrefs on her_xrefs.watprn=her_core.watprn

WHERE her_project_link.fileno=[rowid] 

group by her_core.prn;
title:   [b]ID
[/b] ,,id,,                  [b]NAME[/b] , ,name,,[br][br], 

[b]NGR[/b] , [i],ngr,[/i]   , [b]TYPE [/b] , [i],t1,[/i],[br], [br],

[b]DESCRIPTION[/b] , [i], d1 ,[/i][br][br], 

[b]CONDITION[/b] , [i],c1,[/i][br], [br],

[b]STATUS[/b] ,[i], status1,[/i][br][br],

[b]CROSS REFERENCES[/b] ,[i], xref,[/i]}