| # | "); echo("Inst. Type | ");
echo("Institution | "); echo("AY".$acadyr1." | "); echo("AY".$acadyr2." | "); echo("AY".$acadyr3." | "); echo("AY".$acadyr4." | "); echo("AY".$acadyr5." | "); echo("||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Credential Seekers | "); echo("Pell | "); echo("Percent | "); echo("Credential Seekers | "); echo("Pell | "); echo("Percent | "); echo("Credential Seekers | "); echo("Pell | "); echo("Percent | "); echo("Credential Seekers | "); echo("Pell | "); echo("Percent | "); echo("Credential Seekers | "); echo("Pell | "); echo("Percent | "); echo("|||||||||||||
| ".$n++." | "); echo("".$inst_type." | "); echo("".odbc_result($resultX, "school_abbr")." | "); // year 1 $queryX1 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS credseek1 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr1."' AND s.degree_intent IN ('2', '4', '6', '7', '8');"; $resultX1 = odbc_exec($conn_id, $queryX1); while (odbc_fetch_row($resultX1)) { $credseek1 = odbc_result($resultX1, "credseek1"); $credseek1_total = $credseek1_total + $credseek1; } echo("".number_format($credseek1,0)." | "); if($acadyr1 < 2011) { $query1 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS cnt1 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr1."' AND s.pell_recipient = '1';"; //echo("".number_format($cnt1,0)." | "); $perc1 = ($cnt1 * 100) / $credseek1; echo("".number_format($perc1,1)."% | "); } if($acadyr1 >= 2011) { $query1 = "SELECT COUNT(DISTINCT(sfa.ssn_id)) AS cnt1 FROM student_financial_aid_table sfa WHERE sfa.fice_code = '".$fice_code."' AND sfa.academic_year = '".$acadyr1."' AND sfa.fund_code = 'USPELL' AND sfa.fund_amount > 0;"; //echo("".number_format($cnt1,0)." | "); $perc1 = ($cnt1 * 100) / $credseek1; echo("".number_format($perc1,1)."% | "); } // year 2 $queryX2 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS credseek2 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr2."' AND s.degree_intent IN ('2', '4', '6', '7', '8');"; $resultX2 = odbc_exec($conn_id, $queryX2); while (odbc_fetch_row($resultX2)) { $credseek2 = odbc_result($resultX2, "credseek2"); $credseek2_total = $credseek2_total + $credseek2; } echo("".number_format($credseek2,0)." | "); if($acadyr2 < 2011) { $query2 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS cnt2 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr2."' AND s.pell_recipient = '1';"; //echo("".number_format($cnt2,0)." | "); $perc2 = ($cnt2 * 100) / $credseek2; echo("".number_format($perc2,1)."% | "); } if($acadyr2 >= 2011) { $query2 = "SELECT COUNT(DISTINCT(sfa.ssn_id)) AS cnt2 FROM student_financial_aid_table sfa WHERE sfa.fice_code = '".$fice_code."' AND sfa.academic_year = '".$acadyr2."' AND sfa.fund_code = 'USPELL' AND sfa.fund_amount > 0;"; //echo("".number_format($cnt2,0)." | "); $perc2 = ($cnt2 * 100) / $credseek2; echo("".number_format($perc2,1)."% | "); } // year 3 $queryX3 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS credseek3 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr3."' AND s.degree_intent IN ('2', '4', '6', '7', '8');"; $resultX3 = odbc_exec($conn_id, $queryX3); while (odbc_fetch_row($resultX3)) { $credseek3 = odbc_result($resultX3, "credseek3"); $credseek3_total = $credseek3_total + $credseek3; } echo("".number_format($credseek3,0)." | "); if($acadyr3 < 2011) { $query3 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS cnt3 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr3."' AND s.pell_recipient = '1';"; //echo("".number_format($cnt3,0)." | "); $perc3 = ($cnt3 * 100) / $credseek3; echo("".number_format($perc3,1)."% | "); } if($acadyr3 >= 2011) { $query3 = "SELECT COUNT(DISTINCT(sfa.ssn_id)) AS cnt3 FROM student_financial_aid_table sfa WHERE sfa.fice_code = '".$fice_code."' AND sfa.academic_year = '".$acadyr3."' AND sfa.fund_code = 'USPELL' AND sfa.fund_amount > 0;"; //echo("".number_format($cnt3,0)." | "); $perc3 = ($cnt3 * 100) / $credseek3; echo("".number_format($perc3,1)."% | "); } // year 4 $queryX4 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS credseek4 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr4."' AND s.degree_intent IN ('2', '4', '6', '7', '8');"; $resultX4 = odbc_exec($conn_id, $queryX4); while (odbc_fetch_row($resultX4)) { $credseek4 = odbc_result($resultX4, "credseek4"); $credseek4_total = $credseek4_total + $credseek4; } echo("".number_format($credseek4,0)." | "); if($acadyr4 < 2011) { $query4 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS cnt4 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr4."' AND s.pell_recipient = '1';"; //echo("".number_format($cnt4,0)." | "); $perc4 = ($cnt4 * 100) / $credseek4; echo("".number_format($perc4,1)."% | "); } if($acadyr4 >= 2011) { $query4 = "SELECT COUNT(DISTINCT(sfa.ssn_id)) AS cnt4 FROM student_financial_aid_table sfa WHERE sfa.fice_code = '".$fice_code."' AND sfa.academic_year = '".$acadyr4."' AND sfa.fund_code = 'USPELL' AND sfa.fund_amount > 0;"; //echo("".number_format($cnt4,0)." | "); $perc4 = ($cnt4 * 100) / $credseek4; echo("".number_format($perc4,1)."% | "); } // year 5 $queryX5 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS credseek5 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr5."' AND s.degree_intent IN ('2', '4', '6', '7', '8');"; $resultX5 = odbc_exec($conn_id, $queryX5); while (odbc_fetch_row($resultX5)) { $credseek5 = odbc_result($resultX5, "credseek5"); $credseek5_total = $credseek5_total + $credseek5; } echo("".number_format($credseek5,0)." | "); if($acadyr5 < 2011) { $query5 = "SELECT COUNT(DISTINCT(s.ssn_id)) AS cnt5 FROM student_table s WHERE s.fice_code = '".$fice_code."' AND s.academic_year = '".$acadyr5."' AND s.pell_recipient = '1';"; //echo("".number_format($cnt5,0)." | "); $perc5 = ($cnt5 * 100) / $credseek5; echo("".number_format($perc5,1)."% | "); } if($acadyr5 >= 2011) { $query5 = "SELECT COUNT(DISTINCT(sfa.ssn_id)) AS cnt5 FROM student_financial_aid_table sfa WHERE sfa.fice_code = '".$fice_code."' AND sfa.academic_year = '".$acadyr5."' AND sfa.fund_code = 'USPELL' AND sfa.fund_amount > 0;"; //echo("".number_format($cnt5,0)." | "); $perc5 = ($cnt5 * 100) / $credseek5; echo("".number_format($perc5,1)."% | "); } echo("
| Grand Total | "); echo("".number_format($credseek1_total,0)." | "); echo("".number_format($cnt1_total,0)." | "); $pp1 = ($cnt1_total * 100) / $credseek1_total; echo("".number_format($pp1,1)."% | "); echo("".number_format($credseek2_total,0)." | "); echo("".number_format($cnt2_total,0)." | "); $pp2 = ($cnt2_total * 100) / $credseek2_total; echo("".number_format($pp2,1)."% | "); echo("".number_format($credseek2_total,0)." | "); echo("".number_format($cnt3_total,0)." | "); $pp3 = ($cnt3_total * 100) / $credseek3_total; echo("".number_format($pp3,1)."% | "); echo("".number_format($credseek2_total,0)." | "); echo("".number_format($cnt4_total,0)." | "); $pp4 = ($cnt4_total * 100) / $credseek4_total; echo("".number_format($pp4,1)."% | "); echo("".number_format($credseek2_total,0)." | "); echo("".number_format($cnt5_total,0)." | "); $pp5 = ($cnt5_total * 100) / $credseek5_total; echo("".number_format($pp5,1)."% | "); echo("||||||||||||
NOTE: AY2011 and later uses the new Financial Aid data (student_financial_aid_table).