getFilter.php 330 B

1234567891011121314
  1. <?php
  2. include("connectSQL_Component.php");
  3. $table = [];
  4. $sql = "SELECT DISTINCT object FROM [BIMComponents].[dbo].[API_Table]";
  5. $fetchResult = sqlsrv_query($conn, $sql);
  6. while ($row = sqlsrv_fetch_array($fetchResult)) {
  7. if($row["object"]!=null)
  8. array_push($table,$row);
  9. }
  10. echo json_encode($table);
  11. sqlsrv_close($conn);