Fixed descriptions of geometry types - these are column types, not OpenGIS objects
[phpmyadmin.git] / db_sql.php
bloba0526dff58c19a4db8af2dbc7847a3f1902fd083
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package PhpMyAdmin
6 */
8 /**
11 require_once 'libraries/common.inc.php';
13 /**
14 * Runs common work
16 $GLOBALS['js_include'][] = 'functions.js';
17 $GLOBALS['js_include'][] = 'makegrid.js';
18 $GLOBALS['js_include'][] = 'sql.js';
20 if ($GLOBALS['cfg']['CodemirrorEnable']) {
21 $GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js';
22 $GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
25 require 'libraries/db_common.inc.php';
26 require_once 'libraries/sql_query_form.lib.php';
28 // After a syntax error, we return to this script
29 // with the typed query in the textarea.
30 $goto = 'db_sql.php';
31 $back = 'db_sql.php';
33 /**
34 * Sets globals from $_GET
37 $get_params = array(
38 'db_query_force'
41 foreach ($get_params as $one_get_param) {
42 if (isset($_GET[$one_get_param])) {
43 $GLOBALS[$one_get_param] = $_GET[$one_get_param];
47 /**
48 * Gets informations about the database and, if it is empty, move to the
49 * "db_structure.php" script where table can be created
51 require 'libraries/db_info.inc.php';
52 if ($num_tables == 0 && empty($db_query_force)) {
53 $sub_part = '';
54 $is_info = true;
55 include 'db_structure.php';
56 exit();
59 /**
60 * Query box, bookmark, insert data from textfile
62 PMA_sqlQueryForm(
63 true, false,
64 isset($_REQUEST['delimiter']) ? htmlspecialchars($_REQUEST['delimiter']) : ';'
67 /**
68 * Displays the footer
70 require 'libraries/footer.inc.php';