<?php
ob_start();
include("include.php");
$res='';

if(!empty($_POST['st']) && $_POST['st']=='get_grade_details')
{
	
	  
	 $sel=executework("SELECT * FROM lms_grade_master WHERE '".$_POST['grade_id']."' >= CAST(TRIM(SUBSTRING_INDEX(age,'-',1)) AS UNSIGNED) AND '".$_POST['grade_id']."' <= CAST(TRIM(SUBSTRING_INDEX(age,'-',-1)) AS UNSIGNED)");
	  
	//$sel=executework("select * from lms_grade_master where age='".$_POST['grade_id']."'");
	$cnt=@mysqli_num_rows($sel);
	while($row=@mysqli_fetch_array($sel))
	{
		$res.="~".$row['grade']."=".$row['grade'];
	}
}


echo $res;
?>