<?php 
include("../db.php");
header('Content-Type: application/json');

    $school     =   $_REQUEST['school'];
    $session    =   $_REQUEST['session'];

    $status = 0;

    $array = array();

	$alltickets = $db->getRows("select * from all_school_dues where  school_url='$school' and view=1 and amount > 0 order by id ");
    if(count($alltickets) > 0){
        $status = 1;

    	foreach($alltickets as $ticket){
                $array[]=$ticket;
    	}

    }
 
echo json_encode($array);
?>