-
Notifications
You must be signed in to change notification settings - Fork 0
/
createtables.php
53 lines (45 loc) · 24.6 KB
/
createtables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
//table header for each type file
$type1_str ='FORM TYPE REPORTING YEAR TRADE SECRET INDICATOR SANITIZED INDICATOR TITLE OF CERTIFYING OFFICIAL NAME OF CERTIFYING OFFICIAL CERTIFYING OFFICIALS SIGNATURE INDICATOR DATE SIGNED TRIFID FACILITY NAME FACILITY STREET FACILITY CITY FACILITY COUNTY FACILITY STATE FACILITY ZIP CODE MAILING NAME MAILING STREET MAILING CITY MAILING STATE MAILING PROVINCE MAILING ZIP CODE ENTIRE FACILITY IND PARTIAL FACILITY IND FEDERAL FACILITY IND GOCO FACILITY IND PUBLIC CONTACT NAME PUBLIC CONTACT PHONE PRIMARY SIC CODE SIC CODE 2 SIC CODE 3 SIC CODE 4 SIC CODE 5 SIC CODE 6 NAICS ORIGIN PRIMARY NAICS CODE NAICS CODE 2 NAICS CODE 3 NAICS CODE 4 NAICS CODE 5 NAICS CODE 6 LATITUDE LONGITUDE DB NR A DB NR B RCRA NR A RCRA NR B NPDES NR A NPDES NR B UIC NR A UIC NR B PARENT COMPANY NAME PARENT COMPANY DB NR DOCUMENT CONTROL NUMBER CAS NUMBER CHEMICAL NAME CLASSIFICATION UNIT OF MEASURE DIOXIN DISTRIBUTION 1 DIOXIN DISTRIBUTION 2 DIOXIN DISTRIBUTION 3 DIOXIN DISTRIBUTION 4 DIOXIN DISTRIBUTION 5 DIOXIN DISTRIBUTION 6 DIOXIN DISTRIBUTION 7 DIOXIN DISTRIBUTION 8 DIOXIN DISTRIBUTION 9 DIOXIN DISTRIBUTION 10 DIOXIN DISTRIBUTION 11 DIOXIN DISTRIBUTION 12 DIOXIN DISTRIBUTION 13 DIOXIN DISTRIBUTION 14 DIOXIN DISTRIBUTION 15 DIOXIN DISTRIBUTION 16 DIOXIN DISTRIBUTION 17 PRODUCE THE CHEMICAL IMPORT THE CHEMICAL ON-SITE USE SALE OR DISTRIBUTION AS A BYPRODUCT AS A MANUFACTURED IMPURITY AS A REACTANT AS A FORMULATION COMPONENT AS AN ARTICLE COMPONENT REPACKAGING AS A PROCESS IMPURITY AS A CHEMICAL PROCESSING AID AS A MANUFACTURING AID ANCILLARY OR OTHER USE MAXIMUM AMOUNT ONSITE FUGITIVE AIR EMISSIONS - TOTAL RELEASE POUNDS FUGITIVE AIR EMISSIONS - TOTAL RELEASE RANGE CODE TOTAL FUGITIVE AIR EMISSIONS FUGITIVE OR NON-POINT AIR EMISSIONS - BASIS OF ESTIMATE STACK AIR EMISSIONS - RELEASE POUNDS STACK AIR EMISSIONS - RELEASE RANGE CODE TOTAL STACK AIR EMISSIONS STACK OR POINT AIR EMISSIONS - BASIS OF ESTIMATE TOTAL AIR EMISSIONS DISCHARGES TO STREAM A - STREAM NAME DISCHARGES TO STREAM A - RELEASE POUNDS DISCHARGES TO STREAM A - RELEASE RANGE CODE TOTAL DISCHARGES TO STREAM A DISCHARGES TO STREAM A - BASIS OF ESTIMATE DISCHARGES TO STREAM A - % FROM STORMWATER DISCHARGES TO STREAM B - STREAM NAME DISCHARGES TO STREAM B - RELEASE POUNDS DISCHARGES TO STREAM B - RELEASE RANGE CODE TOTAL DISCHARGES TO STREAM B DISCHARGES TO STREAM B - BASIS OF ESTIMATE DISCHARGES TO STREAM B - % FROM STORMWATER DISCHARGES TO STREAM C - STREAM NAME DISCHARGES TO STREAM C - RELEASE POUNDS DISCHARGES TO STREAM C - RELEASE RANGE CODE TOTAL DISCHARGES TO STREAM C DISCHARGES TO STREAM C - BASIS OF ESTIMATE DISCHARGES TO STREAM C - % FROM STORMWATER DISCHARGES TO STREAM D - STREAM NAME DISCHARGES TO STREAM D - RELEASE POUNDS DISCHARGES TO STREAM D - RELEASE RANGE CODE TOTAL DISCHARGES TO STREAM D DISCHARGES TO STREAM D - BASIS OF ESTIMATE DISCHARGES TO STREAM D - % FROM STORMWATER DISCHARGES TO STREAM E - STREAM NAME DISCHARGES TO STREAM E - RELEASE POUNDS DISCHARGES TO STREAM E - RELEASE RANGE CODE TOTAL DISCHARGES TO STREAM E DISCHARGES TO STREAM E - BASIS OF ESTIMATE DISCHARGES TO STREAM E - % FROM STORMWATER DISCHARGES TO STREAM F - STREAM NAME DISCHARGES TO STREAM F - RELEASE POUNDS DISCHARGES TO STREAM F - RELEASE RANGE CODE TOTAL DISCHARGES TO STREAM F DISCHARGES TO STREAM F - BASIS OF ESTIMATE DISCHARGES TO STREAM F - % FROM STORMWATER TOTAL NUMBER OF RECEIVING STREAMS TOTAL SURFACE WATER DISCHARGE UGRND INJ ONSITE TO CL I WELLS - RELEASE POUNDS UGRND INJ ONSITE TO CL I WELLS - RELEASE RANGE CODE TOTAL UGRND INJ ONSITE TO CL I WELLS - POUNDS UGRND INJ ONSITE TO CL I WELLS - BASIS OF ESTIMATE UGRND INJ ONSITE TO CL II-V WELLS - RELEASE POUNDS UGRND INJ ONSITE TO CL II-V WELLS - RELEASE RANGE CODE TOTAL UGRND INJ ONSITE TO CL II-V WELLS - POUNDS UNGRND INJ ONSITE TO CL II-V WELLS - BASIS OF ESTIMATE TOTAL UNDERGROUND INJECTION RCRA SUBTITLE C LANDFILLS - RELEASE POUNDS RCRA SUBTITLE C LANDFILLS - RELEASE RANGE CODE TOTAL RCRA SUBTITLE C LANDFILLS RCRA SUBTITLE C LANDFILLS - BASIS OF ESTIMATE OTHER LANDFILLS - RELEASE POUNDS OTHER LANDFILLS - RELEASE RANGE CODE TOTAL OTHER ON-SITE LAND RELEASES OTHER LANDFILLS - BASIS OF ESTIMATE LAND TRTMT/APPL FARMING - RELEASE POUNDS LAND TRTMT/APPL FARMING - RELEASE RANGE CODE TOTAL LAND TREATMENT LAND TRTMT/APPL FARMING - BASIS OF ESTIMATE SURFACE IMPOUNDMENT - RELEASE POUNDS SURFACE IMPOUNDMENT - RANGE CODE TOTAL SURFACE IMPOUNDMENTS SURFACE IMPOUNDMENT - BASIS OF ESTIMATE OTHER DISPOSAL - RELEASE POUNDS OTHER DISPOSAL - RANGE CODE TOTAL OTHER DISPOSAL OTHER DISPOSAL -BASIS OF ESTIMATE TOTAL ON-SITE LAND RELEASES POTWS - TOTAL TRANSFERS - METALS ONLY POTWS - BASIS OF ESTIMATE STORAGE ONLY SOLIDIFICATION/STABILIZATION ( METALS AND METAL COMPOUNDS) WASTEWATER TREATMENT (EXCLUDING POTWS) TRANSFERS TO POTWS (METALS AND METAL COMPOUNDS) UNDERGROUND INJECTION LANDFILLS/DISPOSAL SURFACE IMPOUNDMENTS SURFACE IMPOUNDMENT OTHER LANDFILLS RCRA SUBTITLE C LANDFILSS LAND TREATMENT OTHER LAND DISPOSAL OTHER OFF-SITE MANAGEMENT TRANSFERS TO WASTE BROKER FOR DISPOSAL UNKNOWN TOTAL TRANSFERRED OFF-SITE TO DISPOSAL TRANSFERS TO RECYCLING (M20 ONLY) TRANSFERS TO RECYCLING (M24 ONLY) TRANSFERS TO RECYCLING (M26 ONLY) TRANSFERS TO RECYCLING (M28 ONLY) TRANSFERS TO RECYCLING (M93 ONLY) TRANSFERS TO ENERGY RECOVERY (M56 ONLY) TRANSFERS TO ENERGY RECOVERY (M92 ONLY) TRANSFERS TO TREATMENT (M40 ONLY) TRANSFERS TO TREATMENT (M50 ONLY) TRANSFERS TO TREATMENT (M54 ONLY) TRANSFERS TO TREATMENT (M61 ONLY) TRANSFERS TO TREATMENT (M69 ONLY) TRANSFERS TO TREATMENT (M95 ONLY) TRANSFERS TO POTWS (NON-METALS) TOTAL TRANSFERRED OFF-SITE FOR FURTHER WASTE MANAGEMENT ENERGY RECOVERY ONSITE CURRENT YEAR QUANTITY RECYCLED ONSITE CURRENT YEAR QUANTITY TREATED ONSITE CURRENT YEAR OTHER ON-SITE WASTE MANAGEMENT ON-SITE ENERGY RECOVERY METHOD 1 ON-SITE ENERGY RECOVERY METHOD 2 ON-SITE ENERGY RECOVERY METHOD 3 ON-SITE ENERGY RECOVERY METHOD 4 ON-SITE RECYCLING PROCESSES - METHOD 1 ON-SITE RECYCLING PROCESSES - METHOD 2 ON-SITE RECYCLING PROCESSES - METHOD 3 ON-SITE RECYCLING PROCESSES - METHOD 4 ON-SITE RECYCLING PROCESSES - METHOD 5 ON-SITE RECYCLING PROCESSES - METHOD 6 ON-SITE RECYCLING PROCESSES - METHOD 7 ON-SITE RECYCLING PROCESSES - METHOD 8 ON-SITE RECYCLING PROCESSES - METHOD 9 ON-SITE RECYCLING PROCESSES - METHOD 10 RCRA C SURFACE IMPOUNDMENT - RELEASE POUNDS RCRA C SURFACE IMPOUNDMENT - RANGE CODE TOTAL RCRA C SURFACE IMPOUNDMENTS RCRA C SURFACE IMPOUNDMENT - BASIS OF ESTIMATE OTHER SURFACE IMPOUNDMENT - RELEASE POUNDS OTHER SURFACE IMPOUNDMENT - RANGE CODE TOTAL OTHER SURFACE IMPOUNDMENTS OTHER SURFACE IMPOUNDMENT - BASIS OF ESTIMATE RCRA SUBTITLE C SURFACE IMPOUNDMENTS (M66) OTHER SURFACE IMPOUNDMENTS (M67) UNDERGROUND INJECTION TO CLASS I WELLS (M81) UNDERGROUND INJECTION TO CLASS II-V WELLS (M82) ASSIGNED FED. FACILITY FLAG';
$type2a_str ='REPORTING YEAR TRADE SECRET INDICATOR TRIFID FACILITY NAME FACILITY STREET FACILITY CITY FACILITY COUNTY FACILITY STATE FACILITY ZIP CODE ENTIRE FACILITY IND PARTIAL FACILITY IND FEDERAL FACILITY IND GOCO FACILITY IND PRIMARY SIC CODE SIC CODE 2 SIC CODE 3 SIC CODE 4 SIC CODE 5 SIC CODE 6 NAICS ORIGIN PRIMARY NAICS CODE NAICS CODE 2 NAICS CODE 3 NAICS CODE 4 NAICS CODE 5 NAICS CODE 6 LATITUDE LONGITUDE DB NR A DB NR B RCRA NR A RCRA NR B NPDES NR A NPDES NR B UIC NR A UIC NR B PARENT COMPANY NAME PARENT COMPANY DB NR DOCUMENT CONTROL NUMBER CAS NUMBER CHEMICAL NAME CLASSIFICATION UNIT OF MEASURE DIOXIN DISTRIBUTION 1 DIOXIN DISTRIBUTION 2 DIOXIN DISTRIBUTION 3 DIOXIN DISTRIBUTION 4 DIOXIN DISTRIBUTION 5 DIOXIN DISTRIBUTION 6 DIOXIN DISTRIBUTION 7 DIOXIN DISTRIBUTION 8 DIOXIN DISTRIBUTION 9 DIOXIN DISTRIBUTION 10 DIOXIN DISTRIBUTION 11 DIOXIN DISTRIBUTION 12 DIOXIN DISTRIBUTION 13 DIOXIN DISTRIBUTION 14 DIOXIN DISTRIBUTION 15 DIOXIN DISTRIBUTION 16 DIOXIN DISTRIBUTION 17 QUANTITY RELEASED PRIOR YEAR QUANTITY RELEASED CURRENT YEAR QUANTITY RELEASED FOLLOWING YEAR QUANTITY RELEASED SECOND FOLLOWING YEAR ENERGY RECOVERY ONSITE PRIOR YEAR ENERGY RECOVERY ONSITE CURRENT YEAR ENERGY RECOVERY ONSITE FOLLOWING YEAR ENERGY RECOVERY ONSITE SECOND FOLLOWING YEAR ENERGY RECOVERY OFFSITE PRIOR YEAR ENERGY RECOVERY OFFSITE CURRENT YEAR ENERGY RECOVERY OFFSITE FOLLOWING YEAR ENERGY RECOVERY OFFSITE SECOND FOLLOWING YEAR QUANTITY RECYCLED ONSITE PRIOR YEAR QUANTITY RECYCLED ONSITE CURRENT YEAR QUANTITY RECYCLED ONSITE FOLLOWING YEAR QUANTITY RECYCLED ONSITE SECOND FOLLOWING YEAR QUANTITY RECYCLED OFFSITE PRIOR YEAR QUANTITY RECYCLED OFFSITE CURRENT YEAR QUANTITY RECYCLED OFFSITE FOLLOWING YEAR QUANTITY RECYCLED OFFSITE SECOND FOLLOWING YEAR QUANTITY TREATED ONSITE PRIOR YEAR QUANTITY TREATED ONSITE CURRENT YEAR QUANTITY TREATED ONSITE FOLLOWING YEAR QUANTITY TREATED ONSITE SECOND FOLLOWING YEAR QUANTITY TREATED OFFSITE PRIOR YEAR QUANTITY TREATED OFFSITE CURRENT YEAR QUANTITY TREATED OFFSITE FOLLOWING YEAR QUANTITY TREATED OFFSITE SECOND FOLLOWING YEAR CATASTROPHIC RELEASES OR OTHER ONE-TIME EVENTS PROD RATIO/ACTIVITY INDEX FIRST SOURCE REDUCTION ACTIVITY FIRST SOURCE REDUCTION ACTIVITY DESCRIPTION FIRST SOURCE REDUCTION METHOD - CODE 1 FIRST SOURCE REDUCTION METHOD - CODE 1 DESCRIPTION FIRST SOURCE REDUCTION METHOD - CODE 2 FIRST SOURCE REDUCTION METHOD - CODE 2 DESCRIPTION FIRST SOURCE REDUCTION METHOD - CODE 3 FIRST SOURCE REDUCTION METHOD - CODE 3 DESCRIPTION SECOND SOURCE REDUCTION ACTIVITY SECOND SOURCE REDUCTION ACTIVITY DESCRIPTION SECOND SOURCE REDUCTION METHOD - CODE 1 SECOND SOURCE REDUCTION METHOD - CODE 1 DESCRIPTION SECOND SOURCE REDUCTION METHOD - CODE 2 SECOND SOURCE REDUCTION METHOD - CODE 2 DESCRIPTION SECOND SOURCE REDUCTION METHOD - CODE 3 SECOND SOURCE REDUCTION METHOD - CODE 3 DESCRIPTION THIRD SOURCE REDUCTION ACTIVITY THIRD SOURCE REDUCTION ACTIVITY DESCRIPTION THIRD SOURCE REDUCTION METHOD - CODE 1 THIRD SOURCE REDUCTION METHOD - CODE 1 DESCRIPTION THIRD SOURCE REDUCTION METHOD - CODE 2 THIRD SOURCE REDUCTION METHOD - CODE 2 DESCRIPTION THIRD SOURCE REDUCTION METHOD - CODE 3 THIRD SOURCE REDUCTION METHOD - CODE 3 DESCRIPTION FOURTH SOURCE REDUCTION ACTIVITY FOURTH SOURCE REDUCTION ACTIVITY DESCRIPTION FOURTH SOURCE REDUCTION METHOD - CODE 1 FOURTH SOURCE REDUCTION METHOD - CODE 1 DESCRIPTION FOURTH SOURCE REDUCTION METHOD - CODE 2 FOURTH SOURCE REDUCTION METHOD - CODE 2 DESCRIPTION FOURTH SOURCE REDUCTION METHOD - CODE 3 FOURTH SOURCE REDUCTION METHOD - CODE 3 DESCRIPTION ON-SITE LIMITED RELEASE PRIOR YEAR ON-SITE LIMITED RELEASE CURRENT YEAR ON-SITE LIMITED RELEASE FOLLOWING YEAR ON-SITE LIMITED RELEASE SECOND FOLLOWING YEAR ON-SITE OTHER RELEASE PRIOR YEAR ON-SITE OTHER RELEASE CURRENT YEAR ON-SITE OTHER RELEASE FOLLOWING YEAR ON-SITE OTHER RELEASE SECOND FOLLOWING YEAR OFF-SITE LIMITED RELEASE PRIOR YEAR OFF-SITE LIMITED RELEASE CURRENT YEAR OFF-SITE LIMITED RELEASE FOLLOWING YEAR OFF-SITE LIMITED RELEASE SECOND FOLLOWING YEAR OFF-SITE OTHER RELEASE PRIOR YEAR OFF-SITE OTHER RELEASE CURRENT YEAR OFF-SITE OTHER RELEASE FOLLOWING YEAR OFF-SITE OTHER RELEASE SECOND FOLLOWING YEAR ASSIGNED FED. FACILITY FLAG';
$type2b_str ='REPORTING YEAR TRADE SECRET INDICATOR TRIFID FACILITY NAME FACILITY STREET FACILITY CITY FACILITY COUNTY FACILITY STATE FACILITY ZIP CODE ENTIRE FACILITY IND PARTIAL FACILITY IND FEDERAL FACILITY IND GOCO FACILITY FLAG PRIMARY SIC CODE SIC CODE 2 SIC CODE 3 SIC CODE 4 SIC CODE 5 SIC CODE 6 NAICS ORIGIN PRIMARY NAICS CODE NAICS CODE 2 NAICS CODE 3 NAICS CODE 4 NAICS CODE 5 NAICS CODE 6 LATITUDE LONGITUDE DB NR A DB NR B RCRA NR A RCRA NR B NPDES NR A NPDES NR B UIC NR A UIC NR B PARENT COMPANY NAME PARENT COMPANY DB NR DOCUMENT CONTROL NUMBER CAS NUMBER CHEMICAL NAME CLASSIFICATION UNIT OF MEASURE DIOXIN DISTRIBUTION 1 DIOXIN DISTRIBUTION 2 DIOXIN DISTRIBUTION 3 DIOXIN DISTRIBUTION 4 DIOXIN DISTRIBUTION 5 DIOXIN DISTRIBUTION 6 DIOXIN DISTRIBUTION 7 DIOXIN DISTRIBUTION 8 DIOXIN DISTRIBUTION 9 DIOXIN DISTRIBUTION 10 DIOXIN DISTRIBUTION 11 DIOXIN DISTRIBUTION 12 DIOXIN DISTRIBUTION 13 DIOXIN DISTRIBUTION 14 DIOXIN DISTRIBUTION 15 DIOXIN DISTRIBUTION 16 DIOXIN DISTRIBUTION 17 STREAM 1 - WASTE STREAM CODE STREAM 1 - TRTMT METHOD - SEQUENCE 1 STREAM 1 - TRTMT METHOD - SEQUENCE 2 STREAM 1 - TRTMT METHOD - SEQUENCE 3 STREAM 1 -TRTMT METHOD - SEQUENCE 4 STREAM 1 - TRTMT METHOD - SEQUENCE 5 STREAM 1 - TRTMT METHOD - SEQUENCE 6 STREAM 1 - TRTMT METHOD - SEQUENCE 7 STREAM 1 - TRTMT METHOD - SEQUENCE 8 STREAM 1 - RANGE INFLUENT CONCENT STREAM 1 - TRTMT EFFICIENCY EST STREAM 1 - BASED ON OPERATING DATA? STREAM 2 - WASTE STREAM CODE STREAM 2 - TRTMT METHOD - SEQUENCE 1 STREAM 2 - TRTMT METHOD - SEQUENCE 2 STREAM 2 - TRTMT METHOD - SEQUENCE 3 STREAM 2 -TRTMT METHOD - SEQUENCE 4 STREAM 2 - TRTMT METHOD - SEQUENCE 5 STREAM 2 - TRTMT METHOD - SEQUENCE 6 STREAM 2 - TRTMT METHOD - SEQUENCE 7 STREAM 2 - TRTMT METHOD - SEQUENCE 8 STREAM 2 - RANGE INFLUENT CONCENT STREAM 2 - TRTMT EFFICIENCY EST STREAM 2 - BASED ON OPERATING DATA? STREAM 3 - WASTE STREAM CODE STREAM 3 - TRTMT METHOD - SEQUENCE 1 STREAM 3 - TRTMT METHOD - SEQUENCE 2 STREAM 3 - TRTMT METHOD - SEQUENCE 3 STREAM 3 -TRTMT METHOD - SEQUENCE 4 STREAM 3 - TRTMT METHOD - SEQUENCE 5 STREAM 3 - TRTMT METHOD - SEQUENCE 6 STREAM 3 - TRTMT METHOD - SEQUENCE 7 STREAM 3 - TRTMT METHOD - SEQUENCE 8 STREAM 3 - RANGE INFLUENT CONCENT STREAM 3 - TRTMT EFFICIENCY EST STREAM 3 - BASED ON OPERATING DATA? STREAM 4 - WASTE STREAM CODE STREAM 4 - TRTMT METHOD - SEQUENCE 1 STREAM 4 - TRTMT METHOD - SEQUENCE 2 STREAM 4 - TRTMT METHOD - SEQUENCE 3 STREAM 4 -TRTMT METHOD - SEQUENCE 4 STREAM 4 - TRTMT METHOD - SEQUENCE 5 STREAM 4 - TRTMT METHOD - SEQUENCE 6 STREAM 4 - TRTMT METHOD - SEQUENCE 7 STREAM 4 - TRTMT METHOD - SEQUENCE 8 STREAM 4 - RANGE INFLUENT CONCENT STREAM 4 - TRTMT EFFICIENCY EST STREAM 4 - BASED ON OPERATING DATA? STREAM 5 - WASTE STREAM CODE STREAM 5 - TRTMT METHOD - SEQUENCE 1 STREAM 5 - TRTMT METHOD - SEQUENCE 2 STREAM 5 - TRTMT METHOD - SEQUENCE 3 STREAM 5 -TRTMT METHOD - SEQUENCE 4 STREAM 5 - TRTMT METHOD - SEQUENCE 5 STREAM 5 - TRTMT METHOD - SEQUENCE 6 STREAM 5 - TRTMT METHOD - SEQUENCE 7 STREAM 5 - TRTMT METHOD - SEQUENCE 8 STREAM 5 - RANGE INFLUENT CONCENT STREAM 5 - TRTMT EFFICIENCY EST STREAM 5 - BASED ON OPERATING DATA ASSIGNED FED. FACILITY FLAG';
$type3a_str ='TRIFID DOCUMENT CONTROL NUMBER CAS NUMBER CHEMICAL NAME CLASSIFICATION UNIT OF MEASURE DIOXIN DISTRIBUTION 1 DIOXIN DISTRIBUTION 2 DIOXIN DISTRIBUTION 3 DIOXIN DISTRIBUTION 4 DIOXIN DISTRIBUTION 5 DIOXIN DISTRIBUTION 6 DIOXIN DISTRIBUTION 7 DIOXIN DISTRIBUTION 8 DIOXIN DISTRIBUTION 9 DIOXIN DISTRIBUTION 10 DIOXIN DISTRIBUTION 11 DIOXIN DISTRIBUTION 12 DIOXIN DISTRIBUTION 13 DIOXIN DISTRIBUTION 14 DIOXIN DISTRIBUTION 15 DIOXIN DISTRIBUTION 16 DIOXIN DISTRIBUTION 17 REPORTING YEAR TRADE SECRET INDICATOR FACILITY NAME FACILITY STREET FACILITY CITY FACILITY COUNTY FACILITY STATE FACILITY ZIP CODE ENTIRE FACILITY IND PARTIAL FACILITY IND FEDERAL FACILITY IND GOCO FACILITY IND PRIMARY SIC CODE SIC CODE 2 SIC CODE 3 SIC CODE 4 SIC CODE 5 SIC CODE 6 NAICS ORIGIN PRIMARY NAICS CODE NAICS CODE 2 NAICS CODE 3 NAICS CODE 4 NAICS CODE 5 NAICS CODE 6 LATITUDE LONGITUDE DB NR A DB NR B RCRA NR A RCRA NR B NPDES NR A NPDES NR B UIC NR A UIC NR B PARENT COMPANY NAME PARENT COMPANY DB NR OFF-SITE RCRA ID NR OFF-SITE TRANSFER SEQUENCE NUMBER OFF-SITE NAME OFF-SITE STREET ADDRESS OFF-SITE CITY OFF-SITE COUNTY OFF-SITE STATE OFF-SITE PROVINCE OFF-SITE ZIPCODE OFF-SITE COUNTRY ID OFF-SITE CONTROL XFERS OFF-SITE POUNDS - STORAGE M10 XFERS OFF-SITE RANGE CODE - STORAGE M10 TOTAL XFERS OFF-SITE AMOUNT - STORAGE M10 BASIS OF ESTIMATE M10 XFERS OFF-SITE POUNDS - SOLIDIFICATION/STABILIZATION (METALS) M41 XFERS OFF-SITE RANGE CODE - SOLIDIFICATION/STABILIZATION (METALS) M41 TOTAL XFERS OFF-SITE AMOUNT - SOLIDIFICATION/STABILIZATION (METALS) M41 BASIS OF ESTIMATE M41 XFERS OFF-SITE POUNDS - WASTEWATER TRTMT (METALS) M62 XFERS OFF-SITE RANGE CODE - WASTEWATER TRTMT (METALS) M62 TOTAL XFERS OFF-SITE AMOUNT - WASTEWATER TRTMT (METALS) M62 BASIS OF ESTIMATE M62 XFERS OFF-SITE UNDERGROUND INJECTION POUNDS M71 XFERS OFF-SITE UNDERGROUND INJECTION RANGE CODE M71 TOTAL UNDERGROUND INJECTION AMOUNT M71 BASIS OF ESTIMATE M71 XFERS OFF-SITE LANDFILLS/DISPOSAL SURFACE IMPOUNDMENT POUNDS M72 XFERS OFF-SITE LANDFILLS/DISPOSAL SURFACE IMPOUNDMENT RANGE CODE M72 TOTAL LANDFILLS/DISPOSAL SURFACE IMPOUNDMENT AMOUNT M72 BASIS OF ESTIMATE M72 XFERS OFF-SITE SURFACE IMPOUNDMENT POUNDS MM63 SURFACE IMPOUNDMENT RANGE CODE M63 SURFACE IMPOUNDMENT TOTAL AMOUNT M63 BASIS OF ESTIMATE M63 XFERS OFF-SITE OTHER LANDFILLS POUNDS MM64 OTHER LANDFILLS RANGE CODE M64 OTHER LANDFILLS TOTAL AMOUNT M64 BASIS OF ESTIMATE M64 XFERS OFF-SITE RCRA SUBTITLE C LANDFILLS POUNDS MM65 RCRA SUBTITLE C LANDFILLS RANGE CODE M65 RCRA SUBTITLE C LANDFILLS TOTAL AMOUNT M65 BASIS OF ESTIMATE M65 LAND TREATMENT POUNDS M73 LAND TREATMENT RANGE CODE M73 TOTAL LAND TREATMENT TOTAL AMOUNT M73 BASIS OF ESTIMATE M73 OTHER LAND DISPOSAL POUNDS M79 OTHER LAND DISPOSAL RANGE CODE M79 TOTAL OTHER LAND DISPOSAL AMOUNT M79 BASIS OF ESTIMATE M79 OTHER OFF-SITE MANAGEMENT POUNDS M90 OTHER OFF-SITE MANAGEMENT RANGE CODE M90 TOTAL OTHER OFF-SITE MANAGEMENT AMOUNT M90 BASIS OF ESTIMATE M90 TRANSFER TO WASTE BROKER-DISPOSAL POUNDS M94 TRANSFER TO WASTE BROKER-DISPOSAL RANGE CODE M94 TOTAL TRANSFER TO WASTE BROKER-DISPOSAL AMOUNT M94 BASIS OF ESTIMATE M94 UNKNOWN POUNDS M99 UNKNOWN RANGE CODE M99 TOTAL UNKNOWN AMOUNT M99 BASIS OF ESTIMATE M99 TOTAL AMOUNT TRANSFERRED OFF-SITE FOR DISPOSAL XFERS OFF-SITE POUNDS - SOLIDIFICATION/STABILIZATION M40 XFERS OFF-SITE RANGE CODE - SOLIDIFICATION/STABILIZATION M40 TOTAL XFERS OFF-SITE AMOUNT - SOLIDIFICATION/STABILIZATION M40 BASIS OF ESTIMATE M40 XFERS OFF-SITE POUNDS - INCINERATION/THERMAL TREATMENT M50 XFERS OFF-SITE RANGE CODE - INCINERATION/THERMAL TREATMENT M50 TOTAL XFERS OFF-SITE AMOUNT - INCINERATION/THERMAL TREATMENT M50 BASIS OF ESTIMATE M50 XFERS OFF-SITE POUNDS - INCINERATION/INSIGNIFICANT FUEL VALUE M54 XFERS OFF-SITE RANGE CODE - INCINERATION/INSIGNIFICANT FUEL VALUE M54 TOTAL XFERS OFF-SITE AMOUNT - INCINERATION/INSIGNIFICANT FUEL VALUE M54 BASIS OF ESTIMATE M54 XFERS OFF-SITE POUNDS - WASTEWATER TREATMENT (EXCLUDING POTW) M61 XFERS OFF-SITE RANGE CODE - WASTEWATER TREATMENT M61 TOTAL XFERS OFF-SITE AMOUNT - WASTEWATER TREATMENT M61 BASIS OF ESTIMATE M61 XFERS OFF-SITE POUNDS -OTHER WASTE TREATMENT M69 XFERS OFF-SITE RANGE CODE - OTHER WASTE TREATMENT M69 TOTAL XFERS OFF-SITE AMOUNT - OTHER WASTE TREATMENT M69 BASIS OF ESTIMATE M69 XFERS OFF-SITE POUNDS - TRANSFER TO WASTE BROKER-WASTE TREATMENT M95 XFERS OFF-SITE RANGE CODE - TRANSFER TO WASTE BROKER-WASTE TREATMENT M95 TOTAL XFERS OFF-SITE AMOUNT - TRANSFER TO WASTE BROKER-WASTE TREATMENT M95 BASIS OF ESTIMATE M95 TOTAL AMOUNT TRANSFERRED OFF-SITE FOR TREATMENT XFERS OFF-SITE POUNDS - ENERGY RECOVERY M56 XFERS OFF-SITE RANGE CODE -ENERGY RECOVERY M56 TOTAL XFERS OFF-SITE AMOUNT - ENERGY RECOVERY M56 BASIS OF ESTIMATE M56 XFERS OFF-SITE POUNDS - TRANSFER TO WASTE BROKER-ENERGY RECOVERY M92 XFERS OFF-SITE RANGE CODE - TRANSFER TO WASTE BROKER-ENERGY RECOVERY M92 TOTAL XFERS OFF-SITE AMOUNT - TRANSFER TO WASTE-BROKER-ENERGY RECOVERY M92 BASIS OF ESTIMATE M92 TOTAL AMOUNT TRANSFERRED OFF-SITE FOR ENERGY RECOVERY XFERS OFF-SITE POUNDS - SOLVENTS/ORGANICS RECOVERY M20 XFERS OFF-SITE RANGE CODE - SOLVENTS/ORGANICS RECOVERY M20 TOTAL XFERS OFF-SITE AMOUNT - SOLVENTS/ORGANICS RECOVERY M20 BASIS OF ESTIMATE M20 XFERS OFF-SITE POUNDS -METALS RECOVERY M24 XFERS OFF-SITE RANGE CODE - METALS RECOVERY M24 TOTAL XFERS OFF-SITE AMOUNT - METALS RECOVERY M24 BASIS OF ESTIMATE M24 XFERS OFF-SITE POUNDS - OTHER REUSE OR RECOVERY M26 XFERS OFF-SITE RANGE CODE - OTHER REUSE OR RECOVERY M26 TOTAL XFERS OFF-SITE AMOUNT - OTHER REUSE OR RECOVERY M26 BASIS OF ESTIMATE M26 XFERS OFF-SITE POUNDS - ACID REGENERATION M28 XFERS OFF-SITE RANGE CODE - ACID REGENERATION M28 TOTAL XFERS OFF-SITE AMOUNT - ACID REGENERATION M28 BASIS OF ESTIMATE M28 XFERS OFF-SITE POUNDS - TRANSFER TO WASTE BROKER-RECYCLING M93 XFERS OFF-SITE RANGE CODE - TRANSFER TO WASTE BROKER-RECYCLING M93 TOTAL XFERS OFF-SITE AMOUNT - TRANSFER TO WASTE BROKER-RECYCLING M93 BASIS OF ESTIMATE M93 TOTAL AMOUNT TRANSFERRED OFF-SITE FOR RECYCLING XFERS OFF-SITE RCRA SUBTITLE C SURFACE IMPOUNDMENT POUNDS M66 RCRA SUBTITLE C SURFACE IMPOUNDMENT RANGE CODE M66 RCRA SUBTITLE C SURFACE IMPOUNDMENT TOTAL AMOUNT M66 BASIS OF ESTIMATE M66 XFERS OFF-SITE OTHER SURFACE IMPOUNDMENT POUNDS OTHER SURFACE IMPOUNDMENT RANGE CODE M67 OTHER SURFACE IMPOUNDMENT TOTAL AMOUNT M67 BASIS OF ESTIMATE M67 XFERS OFF-SITE UNDERGROUND INJ. CLASS I WELLS POUNDS M81 UNDERGROUND INJ. CLASS I WELLS RANGE CODE M81 UNDERGROUND INJ. CLASS I WELLS TOTAL AMOUNT M81 BASIS OF ESTIMATE M81 XFERS OFF-SITE UNDERGROUND INJ. CLASS II-V WELLS POUNDS M82 UNDERGROUND INJ. CLASS II-V WELLS RANGE CODE M82 UNDERGROUND INJ. CLASS II-V WELLS TOTAL AMOUNT M82 BASIS OF ESTIMATE M82 ASSIGNED FED. FACILITY FLAG';
$type3b_str ='TRIFID DOCUMENT CONTROL NUMBER CAS NUMBER CHEMICAL NAME CLASSIFICATION UNIT OF MEASURE DIOXIN DISTRIBUTION 1 DIOXIN DISTRIBUTION 2 DIOXIN DISTRIBUTION 3 DIOXIN DISTRIBUTION 4 DIOXIN DISTRIBUTION 5 DIOXIN DISTRIBUTION 6 DIOXIN DISTRIBUTION 7 DIOXIN DISTRIBUTION 8 DIOXIN DISTRIBUTION 9 DIOXIN DISTRIBUTION 10 DIOXIN DISTRIBUTION 11 DIOXIN DISTRIBUTION 12 DIOXIN DISTRIBUTION 13 DIOXIN DISTRIBUTION 14 DIOXIN DISTRIBUTION 15 DIOXIN DISTRIBUTION 16 DIOXIN DISTRIBUTION 17 REPORTING YEAR TRADE SECRET INDICATOR FACILITY NAME FACILITY STREET FACILITY CITY FACILITY COUNTY FACILITY STATE FACILITY ZIP CODE ENTIRE FACILITY IND PARTIAL FACILITY IND FEDERAL FACILITY IND GOCO FACILITY IND PRIMARY SIC CODE SIC CODE 2 SIC CODE 3 SIC CODE 4 SIC CODE 5 SIC CODE 6 NAICS ORIGIN PRIMARY NAICS CODE NAICS CODE 2 NAICS CODE 3 NAICS CODE 4 NAICS CODE 5 NAICS CODE 6 LATITUDE LONGITUDE DB NR A DB NR B RCRA NR A RCRA NR B NPDES NR A NPDES NR B UIC NR A UIC NR B PARENT COMPANY NAME PARENT COMPANY DB NR TOTAL POTW TRANSFERS BASIS OF ESTIMATE FOR POTWS POTW A - NAME POTW A - ADDRESS POTW A - CITY POTW A - STATE POTW A - COUNTY POTW A - ZIP POTW B - NAME POTW B - ADDRESS POTW B - CITY POTW B - STATE POTW B - COUNTY POTW B - ZIP ASSIGNED FED. FACILITY FLAG';
$type4_str ='REPORTING YEAR TITLE OF CERTIFYING OFFICIAL NAME OF CERTIFYING OFFICIAL TRIFID FACILITY NAME FACILITY STREET FACILITY CITY FACILITY COUNTY FACILITY STATE FACILITY ZIP CODE MAILING NAME MAILING STREET MAILING CITY MAILING STATE MAILING PROVINCE MAILING ZIP CODE ENTIRE FACILITY IND PARTIAL FACILITY IND FEDERAL FACILITY IND GOCO FACILITY IND PUBLIC CONTACT NAME PUBLIC CONTACT PHONE PRIMARY SIC CODE SIC CODE 2 SIC CODE 3 SIC CODE 4 SIC CODE 5 SIC CODE 6 NAICS ORIGIN PRIMARY NAICS CODE NAICS CODE 2 NAICS CODE 3 NAICS CODE 4 NAICS CODE 5 NAICS CODE 6 LATITUDE LONGITUDE DB NR A DB NR B RCRA NR A RCRA NR B NPDES NR A NPDES NR B UIC NR A UIC NR B PARENT COMPANY NAME PARENT COMPANY DB NR ASSIGNED FED. FACILITY FLAG';
$type5_str ='TRIFID DOCUMENT CONTROL NUMBER CAS NUMBER CHEMICAL NAME CLASSIFICATION REPORTING YEAR FACILITY NAME FACILITY STREET FACILITY CITY FACILITY COUNTY FACILITY STATE FACILITY ZIP CODE ENTIRE FACILITY IND PARTIAL FACILITY IND FEDERAL FACILITY IND GOCO FACILITY IND PRIMARY SIC CODE SIC CODE 2 SIC CODE 3 SIC CODE 4 SIC CODE 5 SIC CODE 6 NAICS ORIGIN PRIMARY NAICS CODE NAICS CODE 2 NAICS CODE 3 NAICS CODE 4 NAICS CODE 5 NAICS CODE 6 LATITUDE LONGITUDE DB NR A DB NR B RCRA NR A RCRA NR B NPDES NR A NPDES NR B UIC NR A UIC NR B PARENT COMPANY NAME PARENT COMPANY DB NR ADDITION INFORMATION - SOURCE REDUCTION ASSIGNED FED. FACILITY FLAG';
//taken from: http://us3.php.net/manual/en/function.preg-replace.php#87058
function string_to_filename($word) {
$tmp = preg_replace('/^\W+|\W+$/', '', trim($word)); // remove all non-alphanumeric chars at begin & end of string
$tmp = preg_replace('/\s+/', '', $tmp); // compress internal whitespace and replace with _
return strtolower(preg_replace('/\W/', '', $tmp)); // remove all non-alphanumeric chars except _ and -
}
$type1 = explode("\t",trim($type1_str));
$type2a = explode("\t",trim($type2a_str));
$type2b = explode("\t",trim($type2b_str));
$type3a = explode("\t",trim($type3a_str));
$type3b = explode("\t",trim($type3b_str));
$type4 = explode("\t",trim($type4_str));
$type5 = explode("\t",trim($type5_str));
//print_r($type1);
function createTableSchema($tablefields, $file_type)
{
$str = "CREATE TABLE epa_data_".$file_type." ("."\n";
$end = end($tablefields);
foreach($tablefields as $field) {
if($field == $end) {
$str .= string_to_filename($field) . " varchar(200) NOT NULL DEFAULT ''"."\n";
}
else {
$str .= string_to_filename($field) . " varchar(200) NOT NULL DEFAULT '',"."\n";
}
}
$str .= ");\n\n";
return $str;
}
echo createTableSchema($type1, 'type1');
echo createTableSchema($type2a, 'type2a');
echo createTableSchema($type2b, 'type2b');
echo createTableSchema($type3a, 'type3a');
echo createTableSchema($type3b, 'type3b');
echo createTableSchema($type4, 'type4');
echo createTableSchema($type5, 'type5');