private function fetchBackReferences() {
        $qry = "SELECT k.COLUMN_NAME as refColumn, k.TABLE_SCHEMA as refDB, k.TABLE_NAME as refTable,
			k.REFERENCED_COLUMN_NAME as columnName" .
                " FROM information_schema.KEY_COLUMN_USAGE k" .
                " WHERE k.TABLE_SCHEMA = '" . $this->connection->getDBName() .
                "' AND k.REFERENCED_TABLE_NAME = '" . $this->name . "'";

        $backRef = $this->connection->doPrepare($qry);
        if (is_bool($backRef)) return;

        foreach ($backRef as &$info) {
            $name = $info['columnName'];
            unset($info['columnName']);
            $this->backReferences[$name][] = $info;
        }
    }
private function fetchBackReferences() {
        $qry = "SELECT k.COLUMN_NAME as refColumn, k.TABLE_SCHEMA as refDB, k.TABLE_NAME as refTable,
			k.REFERENCED_COLUMN_NAME as columnName" .
                " FROM information_schema.KEY_COLUMN_USAGE k" .
                " WHERE k.TABLE_SCHEMA = '" . $this->connection->getDBName() .
                "' AND k.REFERENCED_TABLE_NAME = '" . $this->name . "'";

        $backRef = $this->connection->doPrepare($qry);
        if (is_bool($backRef)) return;

        foreach ($backRef as &$info) {
            $name = $info['columnName'];
            unset($info['columnName']);
            $this->backReferences[$name][] = $info;
        }
    }
private function fetchBackReferences ( ) { $ qry = "SELECT k.COLUMN_NAME as refColumn, k.TABLE_SCHEMA as refDB, k.TABLE_NAME as refTable,
			k.REFERENCED_COLUMN_NAME as columnName" . " FROM information_schema.KEY_COLUMN_USAGE k" . " WHERE k.TABLE_SCHEMA = '" . $ this -> connection -> getDBName ( ) . "' AND k.REFERENCED_TABLE_NAME = '" . $ this -> name . "'" ; $ backRef = $ this -> connection -> doPrepare ( $ qry ) ; if ( is_bool ( $ backRef ) ) return ; foreach ( $ backRef as & $ info ) { $ name = $ info [ 'columnName' ] ; unset ( $ info [ 'columnName' ] ) ; $ this -> backReferences [ $ name ] [ ] = $ info ; } }
Fetches the tables that reference this table, and their columns
Fetches the tables that reference this table and their columns