2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Format SQL for SQL editors
10 * Loading common files. Used to check for authorization, localization and to
11 * load the parsing library.
13 require_once 'libraries/common.inc.php';
15 $query = !empty($_POST['sql']) ?
$_POST['sql'] : '';
17 $query = SqlParser\Utils\Formatter
::format($query);
19 $response = PMA\libraries\Response
::getInstance();
20 $response->addJSON("sql", $query);