<?php /*
    header("Content-Type:application/json");
    include("connection.php");
    include("utils.php");
    
    // Vamos a consultar los colegios privado
    
    $sql = "SELECT * FROM schools WHERE private = 1";
    if (!$rs=$db->query($sql))
        badEnd("500", array("msg"=>$db->error.$sql));
    
    // Verificamos que tengan pagos
    while($row = $rs->fetch_assoc()){
        $sql = "SELECT COUNT(id) AS qty FROM payments WHERE schoolid = ".$row['id'];
        if (!$resVe=$db->query($sql))
            badEnd("500", array("msg"=>$db->error.$sql));
        
        $verify = $resVe->fetch_assoc();
        
        if($verify['count'] > 0){
            $sql = "UPDATE schools SET estimatedpupilsedit = 0 WHERE id".$row['id'];
            if (!$db->query($sql))
                badEnd("500", array("msg"=>$db->error.$sql));
        }
    }
    
    header("HTTP/1.1 200");
    echo (json_encode($out));
    die();*/
?>