title: PHP MSSQL PDO get table names?
body: <p>i want to get array of tables from remote database using PDO ( MSSQL )
   i notice i cannot use mysql query commands , <strong>any advice how to get all tables information from mssql database using pdo or mssql ?</strong></p>
  
  <p>i am able to connect : </p>
  
  <pre><code>try {
      $hostname = $myServer;
      $port = 10060;
      $dbname = $myDB ;
      $username = $myUser ;
      $pw = $myPass;
      $dbh = new PDO ("mssql:host=$hostname;dbname=$dbname","$username","$pw");
    } catch (PDOException $e) {
      echo "Failed to get DB handle: " . $e-&gt;getMessage() . "\n";
      exit;
    }
  </code></pre>
  
  <p>but not able to get data :</p>
  
  <pre><code>$q = $dbh-&gt;prepare("DESCRIBE");
  $q-&gt;execute();
  $table_fields = $q-&gt;fetchAll(PDO::FETCH_COLUMN);
  print_r($table_fields);
  
    } catch (PDOException $e) {
      echo "Failed to get DB handle: " . $e-&gt;getMessage() . "\n";
      exit;
    }
  </code></pre>
  
  <p>user permissions i am using has only <code>read</code> permission </p>