Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorales-bulko <44088923+ales-bulko@users.noreply.github.com>2018-11-27 01:34:09 +0300
committerMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-11-27 01:59:58 +0300
commit0be9c136894c87c9e29ca38b50aac35847b335ae (patch)
tree3e52ad2dfd1fe33cdd8b1678ed7b21b48a38b91c /db_multi_table_query.php
parent5e8642b387b4ba6126cff0fa16496dc814b8c6ef (diff)
Fixes #14658 - Regression on multi table query (#14681)
Added functionality to generate SELECT query with JOINs of requested tables. It was mentioned that it's just a bug and it was working in previous versions, but I did not see any code fragments that would make it possible. Please, feel free to suggest any better solution if you don't like that one. Fixes #14658 Signed-off-by: Aleš Buľko <ales.bulko@student.tuke.sk> (cherry picked from commit 23ce7cec521f830736cb6ee177ec4c3d03516df2) Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'db_multi_table_query.php')
-rw-r--r--db_multi_table_query.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/db_multi_table_query.php b/db_multi_table_query.php
index 1ae4944db0..e30f15d3fa 100644
--- a/db_multi_table_query.php
+++ b/db_multi_table_query.php
@@ -16,6 +16,13 @@ if (isset($_POST['sql_query'])) {
$_REQUEST['db'],
$pmaThemeImage
);
+} if (isset($_GET['tables'])) {
+ $constrains = $GLOBALS['dbi']->getForeignKeyConstrains(
+ $_REQUEST['db'],
+ $_GET['tables']
+ );
+ $response = Response::getInstance();
+ $response->addJSON('foreignKeyConstrains',$constrains);
} else {
$response = Response::getInstance();
@@ -23,6 +30,7 @@ if (isset($_POST['sql_query'])) {
$scripts = $header->getScripts();
$scripts->addFile('vendor/jquery/jquery.md5.js');
$scripts->addFile('db_multi_table_query.js');
+ $scripts->addFile('db_query_generator.js');
$queryInstance = new MultiTableQuery($GLOBALS['dbi'], $db);