protected function isForeignKey($table, $field)
    {
        foreach ($this->foreignKeys['all'] as $entry) {
            if ($entry->COLUMN_NAME == $field && $entry->TABLE_NAME == $table) {
                return true;
            }
        }

        return false;
    }
protected function isForeignKey($table, $field)
    {
        foreach ($this->foreignKeys['all'] as $entry) {
            if ($entry->COLUMN_NAME == $field && $entry->TABLE_NAME == $table) {
                return true;
            }
        }

        return false;
    }
protected function isForeignKey ( $ table , $ field ) { foreach ( $ this -> foreignKeys [ 'all' ] as $ entry ) { if ( $ entry -> COLUMN_NAME == $ field && $ entry -> TABLE_NAME == $ table ) { return true ; } } return false ; }
Check if a given field in a table is a foreign key.

@param $table
@param $field

@return bool
Check if a given field in a table is a foreign key .