2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Format SQL for SQL editors
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);