src/Driver/MySQLDriver.php
protected function foreign($name, $row, Column $column)
    {
        $query = sprintf($this->script, $this->database, $name);

        $table = $this->pdo->prepare($query);

        $table->execute();

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

        while ($item = $table->fetch()) {
            if ($item->column === $row->Field) {
                $referenced = $this->strip($item->referenced_table);

                $column->setReferencedField($item->referenced_column);

                $column->setReferencedTable($referenced);
            }
        }

        return $column;
    }
protected function foreign($name, $row, Column $column)
    {
        $query = sprintf($this->script, $this->database, $name);

        $table = $this->pdo->prepare($query);

        $table->execute();

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

        while ($item = $table->fetch()) {
            if ($item->column === $row->Field) {
                $referenced = $this->strip($item->referenced_table);

                $column->setReferencedField($item->referenced_column);

                $column->setReferencedTable($referenced);
            }
        }

        return $column;
    }
Sets the properties of a column if it does exists.

@param  string                  $name
@param  mixed                   $row
@param  \Rougin\Describe\Column $column
@return \Rougin\Describe\Column