aspect ratio
[phpmyadmin/crack.git] / tbl_properties_export.php3
blob3f1b4f0bc491cc35177861a112b04e7e5e5d23d4
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.php3');
10 $url_query .= '&amp;goto=tbl_properties_export.php3&amp;back=tbl_properties_export.php3';
11 require('./tbl_properties_table_info.php3');
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.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');
62 /**
63 * Displays the footer
65 require('./footer.inc.php3');