3 // vim: expandtab sw=4 ts=4 sts=4:
7 * Gets tables informations and displays top links
9 require('./tbl_properties_common.php3');
10 $url_query .= '&goto=tbl_properties_export.php3&back=tbl_properties_export.php3';
11 require('./tbl_properties_table_info.php3');
14 <!-- Dump of a table
-->
16 <?php
echo $strViewDump . "\n"; ?
>
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.php3, 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('./libraries/display_export.lib.php3');
65 require('./footer.inc.php3');