missed a bit
[phpmyadmin/crack.git] / tbl_properties_export.php3
blob6f282cc9eef9a4f141228777845275c3ff1c1da6
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 ' . $analyzed_sql[0]['select_expr_clause'];
32 if (!empty($analyzed_sql[0]['from_clause'])) {
33 $sql_query .= ' FROM ' . $analyzed_sql[0]['from_clause'];
35 if (!empty($analyzed_sql[0]['where_clause'])) {
36 $sql_query .= ' WHERE ' . $analyzed_sql[0]['where_clause'];
38 if (!empty($analyzed_sql[0]['group_by_clause'])) {
39 $sql_query .= ' GROUP BY ' . $analyzed_sql[0]['group_by_clause'];
41 if (!empty($analyzed_sql[0]['having_clause'])) {
42 $sql_query .= ' HAVING ' . $analyzed_sql[0]['having_clause'];
44 if (!empty($analyzed_sql[0]['order_by_clause'])) {
45 $sql_query .= ' ORDER BY ' . $analyzed_sql[0]['order_by_clause'];
48 // TODO: can we avoid reparsing the query here?
49 PMA_showMessage($GLOBALS['strSQLQuery']);
52 $tbl_dump_form_name = 'tbl_dump';
53 require('./libraries/display_export.lib.php3');
56 /**
57 * Displays the footer
59 require('./footer.inc.php3');