Skip to content

Commit

Permalink
Fix #14775 - export to SQL format not available for tables
Browse files Browse the repository at this point in the history
Fixes: #14775 - export to SQL format not available for tables
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Dec 19, 2018
1 parent 348f1fb commit 9511484
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/classes/Display/Export.php
Expand Up @@ -662,6 +662,11 @@ public function getDisplay(
$GLOBALS['single_table'] = $_POST['single_table'];
}

// Export a single table
if (isset($_GET['single_table'])) {
$GLOBALS['single_table'] = $_GET['single_table'];
}

/* Scan for plugins */
/* @var $exportList ExportPlugin[] */
$exportList = Plugins::getPlugins(
Expand Down

7 comments on commit 9511484

@gesior
Copy link

@gesior gesior commented on 9511484 Dec 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best fix in phpmyadmin history! After 9 years of using phpmyadmin, first time visited github! Just to find this fix!

@khanhkid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha I love this fix.
I used phpmyadmin for a long time and first time I know about github of phpmyadmin

@NathanielNat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please how do I use the code above to resolve the issue?

@NathanielNat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please how do I use the code to fix the issue

@gesior
Copy link

@gesior gesior commented on 9511484 Jan 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NathanielNat
Open file libraries/classes/Display/Export.php in phpmyadmin folder.
Find:

/* Scan for plugins */

and above paste:

        // Export a single table
        if (isset($_GET['single_table'])) {
            $GLOBALS['single_table'] = $_GET['single_table'];
        }

@W1DJM
Copy link

@W1DJM W1DJM commented on 9511484 Feb 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simpler "fix" that doesn't require any editing ... courtesy of an answer from this post on StackOverflow:

Select the db, then check next to the table, select export under "with selected" and you will get the SQL option.

@davis-byamugisha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Works like a charm

Please sign in to comment.