title: PDO and Database Class - Getting Table Schema
body: <p>I've got this class "Database", it extends PDO, and I can do searches and find all perfect like this:</p>
  
  <pre><code>public function select($sql, $array = array(), $fetchMode = PDO::FETCH_ASSOC){
      $sth = $this-&gt;prepare($sql);
      foreach ($array as $key =&gt; $value) {
          $sth-&gt;bindValue("$key", $value);
      }
  
      $sth-&gt;execute();
      return $sth-&gt;fetchAll($fetchMode);
  }
  </code></pre>
  
  <p>But now i want a function that lets me retrieve a tables schema...</p>
  
  <p>I tried to work with PDO:cubic_schema, but can't make it work. I keep getting that either the constant cant be found or the method cannot be found, here's a try...</p>
  
  <pre><code>    public function schema($table) {
      $table_information = $this-&gt;cubrid_schema(PDO::CUBRID_SCH_CLASS, $table);
      return $table_information;
  }
  </code></pre>
  
  <p>any advice would be appreciated!</p>