prepare("select * from average where grades = :a ") ;
$alpha->bindparam(':a', $af) ;
$alpha->execute() ;
if($alpha->rowcount() > 0)
{
$rowds = $alpha->FETCH(PDO::FETCH_ASSOC) ;
$as = $rowds['start'] ;
$ae = $rowds['end'] ;
}
//get credits grade
$cd = 'Credit' ;
$crd = $DBcon->prepare( "select * from average where grades = :c ") ;
$crd->bindparam(':c', $cd) ;
$crd->execute() ;
if($crd->rowcount() > 0)
{
$rowcr = $crd->FETCH(PDO::FETCH_ASSOC) ;
$cs = $rowcr['start'] ;
$ce = $rowcr['end'] ;
}
//get pass grade
$p = 'Pass' ;
$pass = $DBcon->prepare("select * from average where grades = :p ") ;
$pass->bindparam(':p' , $p) ;
$pass->execute() ;
if($pass->rowcount() > 0)
{
$rowps = $pass->FETCH(PDO::FETCH_ASSOC) ;
$ps = $rowps['start'] ;
$pe = $rowps['end'] ;
}
//get failure grades
$f = 'Fail' ;
$fail =$DBcon->prepare("select * from average where grades =:f ") ;
$fail->bindparam(':f' , $f) ;
$fail->execute() ;
if($fail->rowcount() > 0)
{
$rowfl = $fail->FETCH(PDO::FETCH_ASSOC) ;
$fs = $rowfl['start'] ;
$fe = $rowfl['end'] ;
}
//get promotional average
$pa = 'Promotion Average' ;
$pro = $DBcon->prepare("select * from average where grades = :pr ");
$pro->bindparam(':pr' , $pa) ;
$pro->execute() ;
if($pro->rowcount() > 0)
{
$rowpro = $pro->FETCH(PDO::FETCH_ASSOC) ;
$prs = $rowpro['start'] ;
$pre = $rowpro['end'] ;
}
//end....
//VARIABLES
$pin = $_SESSION['pin'] ;
$classid = $_SESSION["classid"] ;
$schyear = $_SESSION["schsesion"] ;
$term = $_SESSION["term"] ;
$regno = $_SESSION["rgno"] ;
// $classtotal = $_SESSION["classnumc"] ;
$level = substr($classid, 0, 7);
$level1 = substr($classid, 0, 2);
$myArr = array();
//get student name from students table
$sqlname = $DBcon->prepare("select * from students where regno = :reg " ) ;
$sqlname->bindparam(':reg' , $regno) ;
$sqlname->execute() ;
if ($sqlname->rowcount() > 0)
{
$rowa = $sqlname->FETCH(PDO::FETCH_ASSOC) ;
$studname = $rowa['studentname'] ;
$avat = $rowa['avatar'] ;
}
//GET NUMBER IN CLASS IN THIRD TERM
$sqlpoc = $DBcon->prepare(" select distinct stregno from marks where (term =:tm and acad_session = :yr ) and stclass= :kls " );
$sqlpoc->bindparam(':tm' , $term) ;
$sqlpoc->bindparam(':yr' , $schyear) ;
$sqlpoc->bindparam(':kls' , $classid) ;
$sqlpoc->execute() ;
$numbt = $sqlpoc->rowcount() ;
//$_SESSION["classnumt"] = $numbt ;
//END
//get minimum no of subject
$sqlm = $DBcon->prepare("select * from subjno where (classlevel = :kls and term =:tm) and yr = :y ") ;
$sqlm->bindparam(':kls',$classid) ;
$sqlm->bindparam(':tm',$term) ;
$sqlm->bindparam(':y',$schyear) ;
$sqlm->execute() ;
$rowm = $sqlm->FETCH(PDO::FETCH_ASSOC) ;
$min = $rowm['nos'] ;
//end....
//get next term fees and resumption
$sqlt = $DBcon->prepare("select * from next" ) ;
//$sqlname->bindparam(':reg' , $regno) ;
$sqlt->execute() ;
if ($sqlt->rowcount() > 0)
{
$rowat = $sqlt->FETCH(PDO::FETCH_ASSOC) ;
$nxtf = $rowat['fees'] ;
$nxtr = $rowat['resume'] ;
}
/*
*/
?>
|