Migrated gritter to standardized package (#225)
[openemr.git] / phpmyadmin / db_sql_format.php
blob610b3e22aa260f036cfa2e4e319bd97694d68c60
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Format SQL for SQL editors
6 * @package PhpMyAdmin
7 */
9 /**
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_Response::getInstance();
20 $response->addJSON("sql", $query);