I have a pg query that returns a table I need to separated the table into three parts. Each rows has three Parts basically
[ col 1-8][col 9-22][col 23-28] , [col 1-8] has the same info for all rows I want to print this info as a header on the page [col 23-28] also has duplicate info in the rows as does [col 23-28] the next section to print is the second but I only need 1 instance of data. the last section is also the same multiple rows with duplicate data again I only need 1 instance of each of the data.
I have entered my code and part of the data also I have attached my CSS code and Part of the DATAFILE In XML any help would be great. Thanks:
Code:
<!DOCTYPE html>
<html>
<head>
<style>
table
{
border-collapse:collapse;
}
table, td, th
{
border:1px solid black;
}
td
{
text-align:center;
}
table
{
width:800px;
}
th
{
Height:3px;
}
table.stat th, table.stat td {
font-size : 77%; }
</style>
</head>
<body>
<script>
function owner()
{
var i=1;
do
{
<div align="center">
<td><b>UST Class A/B Operator Designation</b></td>
<table class="stat">
<tr><th>State Owner ID<th>Owner Name:<th>Contact<th>
<tr><td>&c1<td>&c2<th>&c3<th>
<tr><th>Address<th>City:<th>State:<th>Zip
<tr><td>&c4<td>&c5<td>&c6<td>&c7
</table> ;
i++;
}
while (i=1)
}
</script>
<br>
<table class="stat">
<TR><TH><TH colspan="5">Designated Operator
<TR><th>Operator Name<TH>Operator Co<TH>Operator Address<TH>City<TH>State<th>Zip<TH>Operator Phone<TD>Fax<TD>E-Mail
<TR><TD>&c9<TD>&c10<TD>&c11<TD>&c12<td>&c13<td>&c14<td>&c16<td>&c17
</table>
<table class="stat">
<tr><th colspan="4">Operator Training
<tr><th>Training Co<th>Certificate #<th>Training Date<th>AB Designation
<tr><td>&c18<td>&c19<td>&c20<td>&c21
</table><br>
<table class="stat">
<tr><th colspan="7">Facility Information
<tr><th>Site ID<th>Site Name<th>Address<TH>City<TH>State<th>Zip<th>AB Operator Cert#
<tr><td>&c22<td>&c23<td>&c24<td>&c25<td>&c26<td>&c27<td>&c19
</table>
<script>
function owner()
{
var i=1;
do
{
<table class="stat">
<tr><td>Owner Name<td>&c2<th>
<tr><th>
<tr><th>Signature<th colspan="3">;
i++;
}
while (i=1)
}
</script>
</table>
</div>
</body>
</html>
[data example]
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE data [
<!ELEMENT data (AB_data+)>
<!ELEMENT AB_data (ownid,ownername,contact,ownaddress,owncity,ownstate,ownzip,ownphone,aboper,oaddress,ocity,ostate,oz ip,ophone,ocell,ofax,oemail,trainco,certno,trdate,abdes,siteid,sitename,address,city,state,zip)>
<!ELEMENT ownid (#PCDATA)>
<!ELEMENT ownername (#PCDATA)>
<!ELEMENT contact (#PCDATA)>
<!ELEMENT ownaddress (#PCDATA)>
<!ELEMENT owncity (#PCDATA)>
<!ELEMENT ownstate (#PCDATA)>
<!ELEMENT ownzip (#PCDATA)>
<!ELEMENT ownphone (#PCDATA)>
<!ELEMENT aboper (#PCDATA)>
<!ELEMENT oaddress (#PCDATA)>
<!ELEMENT ocity (#PCDATA)>
<!ELEMENT ostate (#PCDATA)>
<!ELEMENT ozip (#PCDATA)>
<!ELEMENT ophone (#PCDATA)>
<!ELEMENT ocell (#PCDATA)>
<!ELEMENT ofax (#PCDATA)>
<!ELEMENT oemail (#PCDATA)>
<!ELEMENT trainco (#PCDATA)>
<!ELEMENT certno (#PCDATA)>
<!ELEMENT trdate (#PCDATA)>
<!ELEMENT abdes (#PCDATA)>
<!ELEMENT siteid (#PCDATA)>
<!ELEMENT sitename (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT state (#PCDATA)>
<!ELEMENT zip (#PCDATA)>
]>
<data>
<AB_data>
<ownid>DEG123</ownid>
<ownername>Duggan Energy Group</ownername>
<contact>Patrick Duggan</contact>
<ownaddress>7600 E Caley Ave</ownaddress>
<owncity>Centennial</owncity>
<ownstate>CO</ownstate>
<ownzip>80111</ownzip>
<ownphone>3038357055</ownphone>
<aboper>Patrick Duggan</aboper>
<oaddress>7600 E Caley Ave</oaddress>
<ocity>Centennial</ocity>
<ostate>CO</ostate>
<ozip>80111</ozip>
<ophone>3038357055</ophone>
<ocell>3038835789</ocell>
<ofax>3033021806</ofax>
<oemail>pat.duggan@dugganegroup.com</oemail>
<trainco>Duggan Energy Group</trainco>
<certno>CGRS</certno>
<trdate>11417</trdate>
<abdes>2009-09-10</abdes>
<siteid>AB</siteid>
<sitename>101-CO</sitename>
<address>ABC C-Store</address>
<city>1313 Mockingbird Lane</city>
<state>Aurora</state>
<zip>CO</zip>
</AB_data>
<AB_data>
<ownid>DEG123</ownid>
<ownername>Duggan Energy Group</ownername>
<contact>Patrick Duggan</contact>
<ownaddress>7600 E Caley Ave</ownaddress>
<owncity>Centennial</owncity>
<ownstate>CO</ownstate>
<ownzip>80111</ownzip>
<ownphone>3038357055</ownphone>
<aboper>Patrick Duggan</aboper>
<oaddress>7600 E Caley Ave</oaddress>
<ocity>Centennial</ocity>
<ostate>CO</ostate>
<ozip>80111</ozip>
<ophone>3038357055</ophone>
<ocell>3038835789</ocell>
<ofax>3033021806</ofax>
<oemail>pat.duggan@dugganegroup.com</oemail>
<trainco></trainco>
<certno>CGRS</certno>
<trdate>114180</trdate>
<abdes>2009-09-10</abdes>
<siteid>AB</siteid>
<sitename>101-CO</sitename>
<address>ABC C-Store</address>
<city>1313 Mockingbird Lane</city>
<state>Aurora</state>
<zip>CO</zip>
</AB_data>
<AB_data>
<ownid>DEG123</ownid>
<ownername>Duggan Energy Group</ownername>
<contact>Patrick Duggan</contact>
<ownaddress>7600 E Caley Ave</ownaddress>
<owncity>Centennial</owncity>
<ownstate>CO</ownstate>
<ownzip>80111</ownzip>
<ownphone>3038357055</ownphone>
<aboper>Patrick Duggan</aboper>
<oaddress>7600 E Caley Ave</oaddress>
<ocity>Centennial</ocity>
<ostate>CO</ostate>
<ozip>80111</ozip>
<ophone>3038357055</ophone>
<ocell>3038835789</ocell>
<ofax>3033021806</ofax>
<oemail>pat.duggan@dugganegroup.com</oemail>
<trainco>Duggan Energy Group</trainco>
<certno>CGRS</certno>
<trdate>11417</trdate>
<abdes>2009-09-10</abdes>
<siteid>AB</siteid>
<sitename>102-CA</sitename>
<address>ABC C-Store</address>
<city>1234 Main St</city>
<state>San Diego</state>
<zip>CA</zip>
</AB_data>
<AB_data>
<ownid>DEG123</ownid>
<ownername>Duggan Energy Group</ownername>
<contact>Patrick Duggan</contact>
<ownaddress>7600 E Caley Ave</ownaddress>
<owncity>Centennial</owncity>
<ownstate>CO</ownstate>
<ownzip>80111</ownzip>
<ownphone>3038357055</ownphone>
<aboper>Patrick Duggan</aboper>
<oaddress>7600 E Caley Ave</oaddress>
<ocity>Centennial</ocity>
<ostate>CO</ostate>
<ozip>80111</ozip>
<ophone>3038357055</ophone>
<ocell>3038835789</ocell>
<ofax>3033021806</ofax>
<oemail>pat.duggan@dugganegroup.com</oemail>
<trainco></trainco>
<certno>CGRS</certno>
<trdate>114180</trdate>
<abdes>2009-09-10</abdes>
<siteid>AB</siteid>
<sitename>102-CA</sitename>
<address>ABC C-Store</address>
<city>1234 Main St</city>
<state>San Diego</state>
<zip>CA</zip>
</AB_data>
<AB_data>
<ownid>DEG123</ownid>
<ownername>Duggan Energy Group</ownername>
<contact>Patrick Duggan</contact>
<ownaddress>7600 E Caley Ave</ownaddress>
<owncity>Centennial</owncity>
<ownstate>CO</ownstate>
<ownzip>80111</ownzip>
<ownphone>3038357055</ownphone>
<aboper>Patrick Duggan</aboper>
<oaddress>7600 E Caley Ave</oaddress>
<ocity>Centennial</ocity>
<ostate>CO</ostate>
<ozip>80111</ozip>
<ophone>3038357055</ophone>
<ocell>3038835789</ocell>
<ofax>3033021806</ofax>
<oemail>pat.duggan@dugganegroup.com</oemail>
<trainco>Duggan Energy Group</trainco>
<certno>CGRS</certno>
<trdate>11417</trdate>
<abdes>2009-09-10</abdes>
<siteid>AB</siteid>
<sitename>104-WY</sitename>
<address>Kwiky Mart</address>
<city>1234 Frontier St</city>
<state>Cheyenne</state>
<zip>WY</zip>
[/data]