");
echo("");
echo("| ".$degree_text.", ".$distinct_text." | ");
echo("
");
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','2')
--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))
{
$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(" | ");
for ($b = 0; $b <= 4; $b++) // BEGIN LOOP #2 FOR EACH YEAR
{
// graduates
$cnt = 0;
$queryX = "SELECT COUNT(".$distinct."(g.ssn_id)) AS cnt
FROM graduated_student_table g
WHERE g.fice_code = '".$fice_code."'
AND g.academic_year = '".$year[$b]."'
".$dl_code." ";
$resultX = odbc_exec($conn_id, $queryX);
while (odbc_fetch_row($resultX))
{
$cnt = odbc_result($resultX, "cnt");
}
echo("".number_format($cnt,0)." | ");
$cnt_total = $cnt_total + $cnt;
/* if ($inst_type == '1') { $cnt_1 = $cnt_1 + $cnt; }
if ($inst_type == '2') { $cnt_2 = $cnt_2 + $cnt; }
if ($inst_type == 'P') { $cnt_P = $cnt_P + $cnt; }
if ($inst_type == 'V') { $cnt_V = $cnt_V + $cnt; }
*/
} // END LOOP #2 FOR YEARS
echo("
");
}
/*
//******************** THIS DOES NOT TOTAL UNDUPLICATED GRADS CORRECTLY***********************
//============ FOUR YEAR TOTALS ===============================================================
echo("");
echo("| Four-Year Totals | ");
for ($b = 0; $b <= 4; $b++) // BEGIN LOOP #2 FOR EACH YEAR
{
// graduates
$cnt_1 = 0;
$queryX = "SELECT COUNT(".$distinct."(g.ssn_id)) AS cnt_1
FROM graduated_student_table g
inner join fice_table f
on g.fice_code = f.fice_code
WHERE g.academic_year = '".$year[$b]."'
and f.inst_type = '1'
".$dl_code." ";
$resultX = odbc_exec($conn_id, $queryX);
while (odbc_fetch_row($resultX))
{
$cnt_1 = odbc_result($resultX, "cnt_1");
}
echo("".number_format($cnt_1,0)." | ");
} // END LOOP #2 FOR YEARS
echo("
");
//============ TWO YEAR TOTALS ===============================================================
echo("");
echo("| Two-Year Totals | ");
for ($b = 0; $b <= 4; $b++) // BEGIN LOOP #2 FOR EACH YEAR
{
// graduates
$cnt_2 = 0;
$queryX = "SELECT COUNT(".$distinct."(g.ssn_id)) AS cnt_2
FROM graduated_student_table g
inner join fice_table f
on g.fice_code = f.fice_code
WHERE g.academic_year = '".$year[$b]."'
and f.inst_type = '2'
".$dl_code." ";
$resultX = odbc_exec($conn_id, $queryX);
while (odbc_fetch_row($resultX))
{
$cnt_2 = odbc_result($resultX, "cnt_2");
}
echo("".number_format($cnt_2,0)." | ");
} // END LOOP #2 FOR YEARS
echo("
");
//============ PUBLIC TOTALS ===============================================================
echo("");
echo("| Public Totals | ");
for ($b = 0; $b <= 4; $b++) // BEGIN LOOP #2 FOR EACH YEAR
{
// graduates
$cnt_public = 0;
$queryX = "SELECT COUNT(".$distinct."(g.ssn_id)) AS cnt_public
FROM graduated_student_table g
inner join fice_table f
on g.fice_code = f.fice_code
WHERE g.academic_year = '".$year[$b]."'
and f.inst_type in ( '1', '2')
".$dl_code." ";
$resultX = odbc_exec($conn_id, $queryX);
while (odbc_fetch_row($resultX))
{
$cnt_public = odbc_result($resultX, "cnt_public");
}
echo("".number_format($cnt_public,0)." | ");
} // END LOOP #2 FOR YEARS
echo("
");
//===========================================================================
*/
echo("
");
odbc_free_result($result1);
odbc_free_result($result2);
odbc_free_result($result3);
odbc_free_result($result4);
odbc_free_result($result5);
odbc_free_result($result6);
odbc_free_result($result7);
odbc_free_result($result8);
odbc_free_result($resultX);
odbc_free_result($resultY);
odbc_error();
odbc_close($conn_id);
?>