query( 'SHOW TABLES FROM ' . PMA\libraries\Util::backquote($foreign_db), null, PMA\libraries\DatabaseInterface::QUERY_STORE ); while ($row = $GLOBALS['dbi']->fetchRow($tables_rs)) { $tables[] = $row[0]; } } // column dropdown $columns = array(); if ($foreign_db && $foreign_table) { if (isset($existrel[$myfield])) { $foreign_column = $existrel[$myfield]['foreign_field']; } $table_obj = new Table($foreign_table, $foreign_db); $columns = $table_obj->getUniqueColumns(false, false); } ?> render( array( 'name' => 'destination_db[' . $myfield_md5 . ']', 'title' => __('Database'), 'values' => $GLOBALS['dblist']->databases, 'foreign' => $foreign_db ) ); ?> render( array( 'name' => 'destination_table[' . $myfield_md5 . ']', 'title' => __('Table'), 'values' => $tables, 'foreign' => $foreign_table ) ); ?> render( array( 'name' => 'destination_column[' . $myfield_md5 . ']', 'title' => __('Column'), 'values' => $columns, 'foreign' => $foreign_column ) ); ?>