Translated using Weblate (Belarusian)
[phpmyadmin.git] / db_sql_format.php
blob4af11f83e4c5ae46484ade9c32ef7e7d7cf41b31
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Format SQL for SQL editors
6 * @package PhpMyAdmin
7 */
8 use PMA\libraries\Response;
10 /**
11 * Loading common files. Used to check for authorization, localization and to
12 * load the parsing library.
14 require_once 'libraries/common.inc.php';
16 $query = !empty($_POST['sql']) ? $_POST['sql'] : '';
18 $query = PhpMyAdmin\SqlParser\Utils\Formatter::format($query);
20 $response = Response::getInstance();
21 $response->addJSON("sql", $query);