Translated using Weblate (Russian)
[phpmyadmin.git] / db_sql_format.php
bloba83e5273ee6d22148b983df52cb31556b5d6af42
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Format SQL for SQL editors
6 * @package PhpMyAdmin
7 */
9 require_once 'libraries/common.inc.php';
10 require_once 'libraries/sql-formatter/lib/SqlFormatter.php';
12 $query = isset($_POST['sql']) ? $_POST['sql'] : '';
14 SqlFormatter::$tab = "\t";
15 $query = SqlFormatter::format($query, false);
17 $response = PMA_Response::getInstance();
18 $response->addJSON("sql", $query);