2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Handles database multi-table querying
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(
19 } if (isset($_GET['tables'])) {
20 $constrains = $GLOBALS['dbi']->getForeignKeyConstrains(
24 $response = Response
::getInstance();
25 $response->addJSON('foreignKeyConstrains',$constrains);
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());