<?php


 $id = intval($_GET['id']);
    include '../rdb/conn.php';
    include '../comunes_php/cors.php';
    include "../comunes_php/Log.class.php"; 
    
    $log = new Log("app_trace", "./");
    $parametros = print_r($_REQUEST,TRUE); 
    $log->insert($parametros, false, false, false);
    
    
    $sql= " select count(*) from vw_proveedores where id = $id";
    
    $rs = mysqli_query( $conn,$sql);
    $row = mysqli_fetch_row($rs);
    $result["total"] = $row[0];
    
    $sql="select
                               *
                                from vw_proveedores p  where id=$id";

    $rs = mysqli_query( $conn,$sql);
    $items = array();
    $row = mysqli_fetch_array($rs);
    $log->insert($sql, false, false, false);

    echo json_encode($row);

  
    
?>