fixed inactivity timeout failure
[openemr.git] / interface / main / myadmin / tbl_properties_export.php
blob98d266f550360a7efa5e58bf8db7dc0d7c9b921b
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Gets tables informations and displays top links
8 */
9 require('./tbl_properties_common.php');
10 $url_query .= '&amp;goto=tbl_properties_export.php&amp;back=tbl_properties_export.php';
11 require('./tbl_properties_table_info.php');
14 <!-- Dump of a table -->
15 <h2>
16 <?php echo $strViewDump . "\n"; ?>
17 </h2>
19 <?php
20 if (isset($sql_query)) {
21 // I don't want the LIMIT clause, so I use the analyzer
22 // to reconstruct the query with only some parts
23 // because the LIMIT clause may come from us (sql.php, sql_limit_to_append
24 // or may come from the user.
25 // Then, the limits set in the form will be added.
26 // TODO: do we need some other parts here, like PROCEDURE or FOR UPDATE?
28 $parsed_sql = PMA_SQP_parse($sql_query);
29 $analyzed_sql = PMA_SQP_analyze($parsed_sql);
30 $sql_query = 'SELECT ';
32 if (isset($analyzed_sql[0]['queryflags']['distinct'])) {
33 $sql_query .= ' DISTINCT ';
36 $sql_query .= $analyzed_sql[0]['select_expr_clause'];
38 if (!empty($analyzed_sql[0]['from_clause'])) {
39 $sql_query .= ' FROM ' . $analyzed_sql[0]['from_clause'];
41 if (!empty($analyzed_sql[0]['where_clause'])) {
42 $sql_query .= ' WHERE ' . $analyzed_sql[0]['where_clause'];
44 if (!empty($analyzed_sql[0]['group_by_clause'])) {
45 $sql_query .= ' GROUP BY ' . $analyzed_sql[0]['group_by_clause'];
47 if (!empty($analyzed_sql[0]['having_clause'])) {
48 $sql_query .= ' HAVING ' . $analyzed_sql[0]['having_clause'];
50 if (!empty($analyzed_sql[0]['order_by_clause'])) {
51 $sql_query .= ' ORDER BY ' . $analyzed_sql[0]['order_by_clause'];
54 // TODO: can we avoid reparsing the query here?
55 PMA_showMessage($GLOBALS['strSQLQuery']);
58 $export_type = 'table';
59 require_once('./libraries/display_export.lib.php');
62 /**
63 * Displays the footer
65 require_once('./footer.inc.php');