Documentation TYPO3 par Ameos

tbl_properties_export.php

00001 <?php
00002 /* $Id: tbl_properties_export.php,v 2.2 2003/11/26 22:52:24 rabus Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 
00005 
00009 require('./tbl_properties_common.php');
00010 $url_query .= '&amp;goto=tbl_properties_export.php&amp;back=tbl_properties_export.php';
00011 require('./tbl_properties_table_info.php');
00012 ?>
00013 
00014 <!-- Dump of a table -->
00015 <h2>
00016     <?php echo $strViewDump . "\n"; ?>
00017 </h2>
00018 
00019 <?php
00020 if (isset($sql_query)) {
00021     // I don't want the LIMIT clause, so I use the analyzer
00022     // to reconstruct the query with only some parts
00023     // because the LIMIT clause may come from us (sql.php, sql_limit_to_append
00024     // or may come from the user.
00025     // Then, the limits set in the form will be added.
00026     // TODO: do we need some other parts here, like PROCEDURE or FOR UPDATE?
00027 
00028     $parsed_sql = PMA_SQP_parse($sql_query);
00029     $analyzed_sql = PMA_SQP_analyze($parsed_sql);
00030     $sql_query = 'SELECT ';
00031 
00032     if (isset($analyzed_sql[0]['queryflags']['distinct'])) {
00033         $sql_query .= ' DISTINCT ';
00034     }
00035 
00036     $sql_query .= $analyzed_sql[0]['select_expr_clause'];
00037 
00038     if (!empty($analyzed_sql[0]['from_clause'])) {
00039         $sql_query .= ' FROM ' . $analyzed_sql[0]['from_clause'];
00040     }
00041     if (!empty($analyzed_sql[0]['where_clause'])) {
00042         $sql_query .= ' WHERE ' . $analyzed_sql[0]['where_clause'];
00043     }
00044     if (!empty($analyzed_sql[0]['group_by_clause'])) {
00045         $sql_query .= ' GROUP BY ' . $analyzed_sql[0]['group_by_clause'];
00046     }
00047     if (!empty($analyzed_sql[0]['having_clause'])) {
00048         $sql_query .= ' HAVING ' . $analyzed_sql[0]['having_clause'];
00049     }
00050     if (!empty($analyzed_sql[0]['order_by_clause'])) {
00051         $sql_query .= ' ORDER BY ' . $analyzed_sql[0]['order_by_clause'];
00052     }
00053 
00054     // TODO: can we avoid reparsing the query here?
00055     PMA_showMessage($GLOBALS['strSQLQuery']);
00056 }
00057 
00058 $export_type = 'table';
00059 require_once('./libraries/display_export.lib.php');
00060 
00061 
00065 require_once('./footer.inc.php');
00066 ?>


Généré par L'expert TYPO3 avec  doxygen 1.4.6