diff options
author | Atul Pratap Singh <atulpratapsingh05@gmail.com> | 2012-06-15 11:10:49 +0400 |
---|---|---|
committer | Atul Pratap Singh <atulpratapsingh05@gmail.com> | 2012-06-15 14:03:36 +0400 |
commit | a2de4d5c341a8823218239a3c7b9680d48953fd0 (patch) | |
tree | f36b9138af467c49ebb839d7c58ed745f2b190c6 /tbl_select.php | |
parent | 34c8c99bac640e10c80a7c594166666df57340df (diff) |
Use PMA_TableSearch in tbl_select.php
Diffstat (limited to 'tbl_select.php')
-rw-r--r-- | tbl_select.php | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/tbl_select.php b/tbl_select.php index d956d5009c..1e1c615d7b 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -14,7 +14,7 @@ */ require_once 'libraries/common.inc.php'; require_once 'libraries/mysql_charsets.lib.php'; -require_once 'libraries/tbl_select.lib.php'; +require_once 'libraries/TableSearch.class.php'; $response = PMA_Response::getInstance(); $header = $response->getHeader(); @@ -36,6 +36,7 @@ foreach ($post_params as $one_post_param) { } } +$table_search = new PMA_TableSearch($db, $table, "normal"); /** * Not selection yet required -> displays the selection form @@ -45,7 +46,6 @@ if (! isset($_POST['columnsToDisplay']) || $_POST['columnsToDisplay'][0] == '') include_once 'libraries/tbl_common.inc.php'; //$err_url = 'tbl_select.php' . $err_url; $url_query .= '&goto=tbl_select.php&back=tbl_select.php'; - /** * Gets table's information */ @@ -56,26 +56,14 @@ if (! isset($_POST['columnsToDisplay']) || $_POST['columnsToDisplay'][0] == '') } // Defines the url to return to in case of error in the next sql statement $err_url = $goto . '?' . PMA_generate_common_url($db, $table); - - // Gets the list and number of fields - list($columnNames, $columnTypes, $columnCollations, $columnNullFlags, $geomColumnFlag) - = PMA_tbl_getFields($db, $table); - - // retrieve keys into foreign fields, if any - // check also foreigners even if relwork is FALSE (to get - // foreign keys from innodb) - $foreigners = PMA_getForeigners($db, $table); - // Displays the table search form - echo PMA_tblSearchGetSelectionForm( - $goto, $db, $table, $columnNames, $columnTypes, $columnCollations, - $columnNullFlags, $geomColumnFlag, $foreigners, "normal" - ); + $response->addHTML($table_search->getSelectionForm($goto)); + } else { /** * Selection criteria have been submitted -> do the work */ - $sql_query = PMA_tblSearchBuildSqlQuery(); + $sql_query = $table_search->buildSqlQuery(); include 'sql.php'; } ?> |