<?php
include "../config.php";

//$con = mysqli_connect($servername,$username,$password);
$return_arr = array();
$conn = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass );
    $return_arr = array();
    $sql = $conn->prepare("SELECT ncto AS id ,concat_ws(' ',ncto, ntipo) AS title , ocupado AS color  FROM valeryus08 WHERE ntipo != 'MAESTRA' ");
    $sql->execute();
    $resultado = $sql->fetchAll(PDO::FETCH_ASSOC);
    echo json_encode($resultado);
    
   
?>