<?php
    	$dil_laboratorio_id= isset($_REQUEST['dil_laboratorio_id']) ? (is_null($_REQUEST['dil_laboratorio_id'])? '':$_REQUEST['dil_laboratorio_id']) : '-';

    include '../rdb/conn.php';
    $result = array();
    
    $sql= "SELECT  count(*) FROM  laboratorios  WHERE  id = $dil_laboratorio_id";
    
    $rs = mysqli_query( $conn,$sql);
    $row = mysqli_fetch_row($rs);
    $result["total"] = $row[0];
    
    if ($row[0]===0) {
    $result["msg"]="No se encontro valores para los mails del Laboratorio  ";
    return;
    }
    
    //ahora que se que hay regitro completo valores
    $sql= "SELECT  mail_laboratorio  FROM  laboratorios  WHERE id = $dil_laboratorio_id";
   
    $rs = mysqli_query( $conn,$sql);
    
    $items = array();
    while($row = mysqli_fetch_object($rs)){
        array_push($items, $row);
    }
    $result["rows"] = $items;
    $result["sql"] = $sql;

    echo json_encode($result);
    //echo json_encode($items);

    
    ?>
    
    
