");
echo("");
echo("| # | ");
echo("Inst Type | ");
echo("Institution | ");
echo("AY".$year[0]." | ");
echo("AY".$year[1]." | ");
echo("AY".$year[2]." | ");
echo("AY".$year[3]." | ");
echo("AY".$year[4]." | ");
echo("
");
$query1 = " SELECT DISTINCT
f.inst_type,
f.school_abbr,
f.fice_code
FROM fice_table f
WHERE f.inst_type in ('1')
--OR f.fice_code IN ('031052', '016498'))
--AND f.fice_code <> '010311'
ORDER BY f.inst_type, f.school_abbr";
$result1 = odbc_exec($conn_id, $query1);
$n = 1;
while (odbc_fetch_row($result1))
{
$earners_total = 0;
$seekers_total = 0;
$inst_type = (odbc_result($result1, "inst_type"));
$fice_code = (odbc_result($result1, "fice_code"));
$school_abbr = (odbc_result($result1, "school_abbr"));
echo("");
echo("| "); echo($n++); echo(" | ");
echo(""); echo($inst_type); echo(" | ");
echo(""); echo($school_abbr); echo(" | ");
// regional critical list of CIP codes
switch($fice_code)
{
case '001090':
$cip_list = "AND (
( g.cip_2000_code = '13' AND
(g.cip_2000_detail = '0301' OR cip_2000_detail = '0401' OR cip_2000_detail = '0408'
OR g.cip_2000_detail = '1001' OR g.cip_2000_detail = '1004' OR g.cip_2000_detail = '1101'
OR g.cip_2000_detail = '1102' OR g.cip_2000_detail = '1202' OR g.cip_2000_detail = '1203'
OR g.cip_2000_detail = '1210' OR g.cip_2000_detail = '1299' OR g.cip_2000_detail = '1303'
OR g.cip_2000_detail = '1305' OR g.cip_2000_detail = '1306' OR g.cip_2000_detail = '1311'
OR g.cip_2000_detail = '1312' OR g.cip_2000_detail = '1314' OR g.cip_2000_detail = '1315'
OR g.cip_2000_detail = '1317' OR g.cip_2000_detail = '1322' OR g.cip_2000_detail = '1323'
OR g.cip_2000_detail = '1329'))
OR
( g.cip_2000_code = '44' AND g.cip_2000_detail = '0701')
OR
( g.cip_2000_code = '51' AND
(g.cip_2000_detail = '0203' OR g.cip_2000_detail = '0204' OR g.cip_2000_detail = '0701'
OR g.cip_2000_detail = '0806' OR g.cip_2000_detail = '0907'))
OR
( g.cip_2010_code = '13' AND
(g.cip_2010_detail = '0301' OR cip_2010_detail = '0401' OR cip_2010_detail = '0408'
OR g.cip_2010_detail = '1001' OR g.cip_2010_detail = '1004' OR g.cip_2010_detail = '1101'
OR g.cip_2010_detail = '1102' OR g.cip_2010_detail = '1202' OR g.cip_2010_detail = '1203'
OR g.cip_2010_detail = '1210' OR g.cip_2010_detail = '1299' OR g.cip_2010_detail = '1303'
OR g.cip_2010_detail = '1305' OR g.cip_2010_detail = '1306' OR g.cip_2010_detail = '1311'
OR g.cip_2010_detail = '1312' OR g.cip_2010_detail = '1314' OR g.cip_2010_detail = '1315'
OR g.cip_2010_detail = '1317' OR g.cip_2010_detail = '1322' OR g.cip_2010_detail = '1323'
OR g.cip_2010_detail = '1329'))
OR
( g.cip_2010_code = '44' AND g.cip_2010_detail = '0701')
OR
( g.cip_2010_code = '51' AND
(g.cip_2010_detail = '0203' OR g.cip_2010_detail = '0204' OR g.cip_2010_detail = '0701'
OR g.cip_2010_detail = '0806' OR g.cip_2010_detail = '0907'))
) ";
$cip_group = ("ASUJ = ".$cip_list."
");
break;
case '001089':
$cip_list = "AND (
( g.cip_2000_code = '13' AND g.cip_2000_detail = '9999'
AND (g.degree_1 IN ('3975') OR g.degree_2 IN ('3975') OR g.degree_3 IN ('3975')) )
OR
( g.cip_2000_code = '43' AND g.cip_2000_detail = '0302'
AND (g.degree_1 IN ('2490', '6490') OR g.degree_2 IN ('2490', '6490') OR g.degree_3 IN ('2490', '6490')) )
OR
( g.cip_2000_code = '52' AND g.cip_2000_detail = '0901'
AND (g.degree_1 IN ('2760') OR g.degree_2 IN ('2760') OR g.degree_3 IN ('2760')) )
OR
( g.cip_2010_code = '13' AND g.cip_2010_detail = '9999'
AND (g.degree_1 IN ('3975') OR g.degree_2 IN ('3975') OR g.degree_3 IN ('3975')) )
OR
( g.cip_2010_code = '43' AND g.cip_2010_detail = '0302'
AND (g.degree_1 IN ('2490', '6490') OR g.degree_2 IN ('2490', '6490') OR g.degree_3 IN ('2490', '6490')) )
OR
( g.cip_2010_code = '52' AND g.cip_2010_detail = '0901'
AND (g.degree_1 IN ('2760') OR g.degree_2 IN ('2760') OR g.degree_3 IN ('2760')) )
) ";
$cip_group = ($cip_group."ATU = ".$cip_list."
");
break;
case '001098':
$cip_list = "AND (
( g.cip_2000_code = '13' AND
(g.cip_2000_detail = '0301' OR cip_2000_detail = '0408' OR cip_2000_detail = '1001'
OR g.cip_2000_detail = '1015' OR g.cip_2000_detail = '1203' OR g.cip_2000_detail = '1317'
OR g.cip_2000_detail = '1401'))
OR
( g.cip_2000_code = '26' AND g.cip_2000_detail = '0101')
OR
( g.cip_2000_code = '40' AND
(g.cip_2000_detail = '0501' OR g.cip_2000_detail = '0801'))
OR
( g.cip_2010_code = '13' AND
(g.cip_2010_detail = '0301' OR cip_2010_detail = '0408' OR cip_2010_detail = '1001'
OR g.cip_2010_detail = '1015' OR g.cip_2010_detail = '1203' OR g.cip_2010_detail = '1317'
OR g.cip_2010_detail = '1401'))
OR
( g.cip_2010_code = '26' AND g.cip_2010_detail = '0101')
OR
( g.cip_2010_code = '40' AND
(g.cip_2010_detail = '0501' OR g.cip_2010_detail = '0801'))
) ";
$cip_group = ($cip_group."HSU = ".$cip_list."
");
break;
case '001107':
$cip_list = "AND (
(g.cip_2000_code IN ('01') AND g.cip_2000_detail IN ('0000') AND g.degree_level IN ('07'))
OR (g.cip_2000_code IN ('01') AND g.cip_2000_detail IN ('0101') AND g.degree_level IN ('05'))
OR (g.cip_2000_code IN ('01') AND g.cip_2000_detail IN ('0102') AND g.degree_level IN ('03'))
OR (g.cip_2000_code IN ('24') AND g.cip_2000_detail IN ('0102') AND g.degree_level IN ('03', '05'))
OR (g.cip_2000_code IN ('51') AND g.cip_2000_detail IN ('3801') AND g.degree_level IN ('03', '05'))
OR (g.cip_2010_code IN ('01') AND g.cip_2010_detail IN ('0000') AND g.degree_level IN ('07'))
OR (g.cip_2010_code IN ('01') AND g.cip_2010_detail IN ('0101') AND g.degree_level IN ('05'))
OR (g.cip_2010_code IN ('01') AND g.cip_2010_detail IN ('0102') AND g.degree_level IN ('03'))
OR (g.cip_2010_code IN ('24') AND g.cip_2010_detail IN ('0102') AND g.degree_level IN ('03', '05'))
OR (g.cip_2010_code IN ('51') AND g.cip_2010_detail IN ('3801') AND g.degree_level IN ('03', '05'))
) ";
$cip_group = ($cip_group."SAUM = ".$cip_list."
");
break;
case '001108':
$cip_list = "AND (g.cip_2000_code IN ('14', '26', '40') OR g.cip_2010_code IN ('14', '26', '40')) ";
$cip_group = ($cip_group."UAF = ".$cip_list."
");
break;
case '001110':
$cip_list = "AND (
( g.cip_2000_code = '30' AND g.cip_2000_detail = '9999'
AND (g.degree_1 IN ('2856', '5335') OR g.degree_2 IN ('2856', '5335') OR g.degree_3 IN ('2856', '5335')) )
OR
( g.cip_2000_code = '43' AND g.cip_2000_detail = '0103'
AND (g.degree_1 IN ('3390') OR g.degree_2 IN ('3390') OR g.degree_3 IN ('3390')) )
OR
( g.cip_2000_code = '51' AND g.cip_2000_detail = '3801'
AND (g.degree_1 IN ('4240') OR g.degree_2 IN ('4240') OR g.degree_3 IN ('4240')) )
OR
( g.cip_2010_code = '30' AND g.cip_2010_detail = '9999'
AND (g.degree_1 IN ('2856', '5335') OR g.degree_2 IN ('2856', '5335') OR g.degree_3 IN ('2856', '5335')) )
OR
( g.cip_2010_code = '43' AND g.cip_2010_detail = '0103'
AND (g.degree_1 IN ('3390') OR g.degree_2 IN ('3390') OR g.degree_3 IN ('3390')) )
OR
( g.cip_2010_code = '51' AND g.cip_2010_detail = '3801'
AND (g.degree_1 IN ('4240') OR g.degree_2 IN ('4240') OR g.degree_3 IN ('4240')) )
) ";
$cip_group = ($cip_group."UAFS = ".$cip_list."
");
break;
case '001101':
$cip_list = "AND (g.cip_2000_code IN ('14', '51') OR g.cip_2010_code IN ('14', '51')) ";
$cip_group = ($cip_group."UALR = ".$cip_list."
");
break;
case '001085':
$cip_list = "AND (
( g.cip_2000_code = '03' AND
(g.cip_2000_detail = '0501' OR cip_2000_detail = '0506' OR cip_2000_detail = '0601'))
OR
( g.cip_2000_code = '13' AND
(g.cip_2000_detail = '0401' OR g.cip_2000_detail = '1203' OR g.cip_2000_detail = '1314'))
OR
( g.cip_2000_code = '15' AND
(g.cip_2000_detail = '0403' OR g.cip_2000_detail = '1102'))
OR
( g.cip_2010_code = '03' AND
(g.cip_2010_detail = '0501' OR cip_2010_detail = '0506' OR cip_2010_detail = '0601'))
OR
( g.cip_2010_code = '13' AND
(g.cip_2010_detail = '0401' OR g.cip_2010_detail = '1203' OR g.cip_2010_detail = '1314'))
OR
( g.cip_2010_code = '15' AND
(g.cip_2010_detail = '0403' OR g.cip_2010_detail = '1102'))
) ";
$cip_group = ($cip_group."UAM = ".$cip_list."
");
break;
case '001109':
$cip_list = "AND (g.cip_2000_code IN ('00') OR g.cip_2010_code IN ('00')) ";
$cip_group = ($cip_group."UAMS = ".$cip_list."
");
break;
case '001086':
$cip_list = "AND (
(g.cip_2000_code = '13' AND (g.cip_2000_detail = '1210' OR g.cip_2000_detail = '1314'))
OR (g.cip_2000_code = '43' AND g.cip_2000_detail = '0104')
OR (g.cip_2000_code = '40' AND (g.cip_2000_detail = '0501' OR g.cip_2000_detail = '0801'))
OR (g.cip_2010_code = '13' AND (g.cip_2010_detail = '1210' OR g.cip_2010_detail = '1314'))
OR (g.cip_2010_code = '43' AND g.cip_2010_detail = '0104')
OR (g.cip_2010_code = '40' AND (g.cip_2010_detail = '0501' OR g.cip_2010_detail = '0801'))
) ";
$cip_group = ($cip_group."UAPB = ".$cip_list."
");
break;
case '001092':
$cip_list = "AND (
(g.cip_2000_code = '13' AND (g.cip_2000_detail = '1311' OR g.cip_2000_detail = '1316'))
OR (g.cip_2000_code = '44' AND g.cip_2000_detail = '0201')
OR (g.cip_2000_code = '51' AND
(g.cip_2000_detail = '1501' OR g.cip_2000_detail = '2306' OR g.cip_2000_detail = '2308' OR g.cip_2000_detail = '3801'))
OR (g.cip_2010_code = '13' AND (g.cip_2010_detail = '1311' OR g.cip_2010_detail = '1316'))
OR (g.cip_2010_code = '44' AND g.cip_2010_detail = '0201')
OR (g.cip_2010_code = '51' AND
(g.cip_2010_detail = '1501' OR g.cip_2010_detail = '2306' OR g.cip_2010_detail = '2308' OR g.cip_2010_detail = '3801'))
) ";
$cip_group = ($cip_group."UCA = ".$cip_list."
");
break;
default:
$cip_list = "AND (g.cip_2000_code IN ('00') OR g.cip_2010_code IN ('00')) ";
// $cip_group = ($cip_group."CLEAR = ".$cip_list."
");
break;
}
for ($b = 0; $b <= 4; $b++) // BEGIN LOOP #2 FOR EACH YEAR
{
$cnt = 0;
$queryX = "SELECT COUNT(".$distinct."(g.ssn_id)) AS earners
FROM graduated_student_table g
WHERE g.fice_code = '".$fice_code."'
AND g.academic_year = '".$year[$b]."'
".$dl_code."
".$cip_list." ;";
// echo("QueryX = ".$queryX."
");
$resultX = odbc_exec($conn_id, $queryX);
while (odbc_fetch_row($resultX))
{
$earners = odbc_result($resultX, "earners");
$totalearnercount[$b] = $totalearnercount[$b] + $earners;
if ($inst_type == '1')
{
$earnercount_1[$b] = $earnercount_1[$b] + $earners;
}
if ($inst_type == '2')
{
$earnercount_2[$b] = $earnercount_2[$b] + $earners;
}
}
echo("".number_format($earners,0). " | ");
$earners_total = $earners_total + $earners;
}
echo("
");
}
echo("");
echo("| 4-Year Universities | ");
// year 1
echo("".number_format($earnercount_1[0],0)." | ");
// year 2
echo("".number_format($earnercount_1[1],0). " | ");
// year 3
echo("".number_format($earnercount_1[2],0). " | ");
// year 4
echo("".number_format($earnercount_1[3],0). " | ");
// year 5
echo("".number_format($earnercount_1[4],0). " | ");
echo("
");
/*
echo("");
echo("| 2-Year Colleges | ");
// year 1
echo("".number_format($earnercount_2[0],0). " | ");
// year 2
echo("".number_format($earnercount_2[1],0). " | ");
// year 3
echo("".number_format($earnercount_2[2],0). " | ");
// year 4
echo("".number_format($earnercount_2[3],0). " | ");
// year 5
echo("".number_format($earnercount_2[4],0). " | ");
echo("
");
/*
echo("");
echo("| Total | ");
// year 1
echo("".number_format($totalearnercount[0],0). " | ");
// year 2
echo("".number_format($totalearnercount[1],0). " | ");
// year 3
echo("".number_format($totalearnercount[2],0). " | ");
// year 4
echo("".number_format($totalearnercount[3],0). " | ");
// year 5
echo("".number_format($totalearnercount[4],0). " | ");
echo("
");
*/
echo("
");
echo("