src/Driver/MySQLDriver.php
protected function query($table, $query, $columns = array())
    {
        $result = $this->pdo->prepare($query);

        $result->execute();

        $result->setFetchMode(\PDO::FETCH_OBJ);

        while ($row = $result->fetch()) {
            $column = $this->column(new Column, $table, $row);

            array_push($columns, $column);
        }

        if (empty($columns) === true) {
            $message = 'Table "' . $table . '" does not exists!';

            throw new TableNotFoundException($message);
        }

        return $columns;
    }
protected function query($table, $query, $columns = array())
    {
        $result = $this->pdo->prepare($query);

        $result->execute();

        $result->setFetchMode(\PDO::FETCH_OBJ);

        while ($row = $result->fetch()) {
            $column = $this->column(new Column, $table, $row);

            array_push($columns, $column);
        }

        if (empty($columns) === true) {
            $message = 'Table "' . $table . '" does not exists!';

            throw new TableNotFoundException($message);
        }

        return $columns;
    }
Returns the list of columns based on a query.

@param  string $table
@param  string $query
@param  array  $columns
@return \Rougin\Describe\Column[]