Translated using Weblate (Czech)
[phpmyadmin.git] / db_multi_table_query.php
blobe30f15d3fa14f874b02dfb73fd93fcfdb4adb1c2
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Handles database multi-table querying
6 * @package PhpMyAdmin
7 */
8 use PhpMyAdmin\Database\MultiTableQuery;
9 use PhpMyAdmin\Response;
11 require_once 'libraries/common.inc.php';
13 if (isset($_POST['sql_query'])) {
14 MultiTableQuery::displayResults(
15 $_POST['sql_query'],
16 $_REQUEST['db'],
17 $pmaThemeImage
19 } if (isset($_GET['tables'])) {
20 $constrains = $GLOBALS['dbi']->getForeignKeyConstrains(
21 $_REQUEST['db'],
22 $_GET['tables']
24 $response = Response::getInstance();
25 $response->addJSON('foreignKeyConstrains',$constrains);
26 } else {
27 $response = Response::getInstance();
29 $header = $response->getHeader();
30 $scripts = $header->getScripts();
31 $scripts->addFile('vendor/jquery/jquery.md5.js');
32 $scripts->addFile('db_multi_table_query.js');
33 $scripts->addFile('db_query_generator.js');
35 $queryInstance = new MultiTableQuery($GLOBALS['dbi'], $db);
37 $response->addHTML($queryInstance->getFormHtml());