Low Income (Pell) Students (2-Year Colleges Only)

Academic Year selected = ".$acadyr." (from AY".$acadyr1." to AY".$acadyr5.").

"); $queryX = "SELECT DISTINCT f.inst_type, f.fice_code, f.school_abbr FROM fice_table f WHERE f.inst_type IN ('2') ORDER BY f.inst_type, f.school_abbr"; $resultX = odbc_exec($conn_id, $queryX); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); $n = 1; while (odbc_fetch_row($resultX)) { $inst_type = (odbc_result($resultX, "inst_type")); $fice_code = (odbc_result($resultX, "fice_code")); echo(""); echo(""); echo(""); echo(""); // 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(""); 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("

".$query1."


"); $result1 = odbc_exec($conn_id, $query1); while (odbc_fetch_row($result1)) { $cnt1 = odbc_result($result1, "cnt1"); $cnt1_total = $cnt1_total + $cnt1; } echo(""); $perc1 = ($cnt1 * 100) / $credseek1; echo(""); } 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("

".$query1."


"); $result1 = odbc_exec($conn_id, $query1); while (odbc_fetch_row($result1)) { $cnt1 = odbc_result($result1, "cnt1"); $cnt1_total = $cnt1_total + $cnt1; } echo(""); $perc1 = ($cnt1 * 100) / $credseek1; echo(""); } // 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(""); 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("

".$query2."


"); $result2 = odbc_exec($conn_id, $query2); while (odbc_fetch_row($result2)) { $cnt2 = odbc_result($result2, "cnt2"); $cnt2_total = $cnt2_total + $cnt2; } echo(""); $perc2 = ($cnt2 * 100) / $credseek2; echo(""); } 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("

".$query2."


"); $result2 = odbc_exec($conn_id, $query2); while (odbc_fetch_row($result2)) { $cnt2 = odbc_result($result2, "cnt2"); $cnt2_total = $cnt2_total + $cnt2; } echo(""); $perc2 = ($cnt2 * 100) / $credseek2; echo(""); } // 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(""); 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("

".$query3."


"); $result3 = odbc_exec($conn_id, $query3); while (odbc_fetch_row($result3)) { $cnt3 = odbc_result($result3, "cnt3"); $cnt3_total = $cnt3_total + $cnt3; } echo(""); $perc3 = ($cnt3 * 100) / $credseek3; echo(""); } 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("

".$query3."


"); $result3 = odbc_exec($conn_id, $query3); while (odbc_fetch_row($result3)) { $cnt3 = odbc_result($result3, "cnt3"); $cnt3_total = $cnt3_total + $cnt3; } echo(""); $perc3 = ($cnt3 * 100) / $credseek3; echo(""); } // 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(""); 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("

".$query4."


"); $result4 = odbc_exec($conn_id, $query4); while (odbc_fetch_row($result4)) { $cnt4 = odbc_result($result4, "cnt4"); $cnt4_total = $cnt4_total + $cnt4; } echo(""); $perc4 = ($cnt4 * 100) / $credseek4; echo(""); } 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("

".$query4."


"); $result4 = odbc_exec($conn_id, $query4); while (odbc_fetch_row($result4)) { $cnt4 = odbc_result($result4, "cnt4"); $cnt4_total = $cnt4_total + $cnt4; } echo(""); $perc4 = ($cnt4 * 100) / $credseek4; echo(""); } // 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(""); 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("

".$query5."


"); $result5 = odbc_exec($conn_id, $query5); while (odbc_fetch_row($result5)) { $cnt5 = odbc_result($result5, "cnt5"); $cnt5_total = $cnt5_total + $cnt5; } echo(""); $perc5 = ($cnt5 * 100) / $credseek5; echo(""); } 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("

".$query5."


"); $result5 = odbc_exec($conn_id, $query5); while (odbc_fetch_row($result5)) { $cnt5 = odbc_result($result5, "cnt5"); $cnt5_total = $cnt5_total + $cnt5; } echo(""); $perc5 = ($cnt5 * 100) / $credseek5; echo(""); } echo(""); } // totals echo(""); echo(""); echo(""); echo(""); $pp1 = ($cnt1_total * 100) / $credseek1_total; echo(""); echo(""); echo(""); $pp2 = ($cnt2_total * 100) / $credseek2_total; echo(""); echo(""); echo(""); $pp3 = ($cnt3_total * 100) / $credseek3_total; echo(""); echo(""); echo(""); $pp4 = ($cnt4_total * 100) / $credseek4_total; echo(""); echo(""); echo(""); $pp5 = ($cnt5_total * 100) / $credseek5_total; echo(""); echo(""); echo("
#Inst.
Type
InstitutionAY".$acadyr1."AY".$acadyr2."AY".$acadyr3."AY".$acadyr4."AY".$acadyr5."
Credential SeekersPellPercentCredential SeekersPellPercentCredential SeekersPellPercentCredential SeekersPellPercentCredential SeekersPellPercent
".$n++."".$inst_type."".odbc_result($resultX, "school_abbr")."".number_format($credseek1,0)."".number_format($cnt1,0)."".number_format($perc1,1)."%".number_format($cnt1,0)."".number_format($perc1,1)."%".number_format($credseek2,0)."".number_format($cnt2,0)."".number_format($perc2,1)."%".number_format($cnt2,0)."".number_format($perc2,1)."%".number_format($credseek3,0)."".number_format($cnt3,0)."".number_format($perc3,1)."%".number_format($cnt3,0)."".number_format($perc3,1)."%".number_format($credseek4,0)."".number_format($cnt4,0)."".number_format($perc4,1)."%".number_format($cnt4,0)."".number_format($perc4,1)."%".number_format($credseek5,0)."".number_format($cnt5,0)."".number_format($perc5,1)."%".number_format($cnt5,0)."".number_format($perc5,1)."%
Grand Total".number_format($credseek1_total,0)."".number_format($cnt1_total,0)."".number_format($pp1,1)."%".number_format($credseek2_total,0)."".number_format($cnt2_total,0)."".number_format($pp2,1)."%".number_format($credseek2_total,0)."".number_format($cnt3_total,0)."".number_format($pp3,1)."%".number_format($credseek2_total,0)."".number_format($cnt4_total,0)."".number_format($pp4,1)."%".number_format($credseek2_total,0)."".number_format($cnt5_total,0)."".number_format($pp5,1)."%
"); 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($result9); odbc_free_result($result10); odbc_error(); odbc_close($conn_id); ?>

NOTE: AY2011 and later uses the new Financial Aid data (student_financial_aid_table).