<?php
include("connectSQL_Component.php");
if (isset($_GET["object"])) {    
    $name = $_GET["object"];    
    $table= [];
  
    $sql = "SELECT * FROM [BIMComponents].[dbo].[API_Table] WHERE id = '" . $name . "' ";
    $fetchResult = sqlsrv_query($conn, $sql);    
    while ($row = sqlsrv_fetch_array($fetchResult)) {
        $table = $row;
    }   

    echo json_encode($table);
}

sqlsrv_close($conn);
