From 2beae0db034a6c045ba798a95b6f3dc2e0be6985 Mon Sep 17 00:00:00 2001 From: chriskl Date: Mon, 18 Aug 2003 08:10:16 +0000 Subject: [PATCH] add save as report to some result pages --- HISTORY | 1 + classes/database/BaseDB.php | 9 +++++++-- display.php | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index 85cbb938..335b3b4b 100644 --- a/HISTORY +++ b/HISTORY @@ -29,6 +29,7 @@ Features: * View and edit table comments * Changed XML format significantly. Now doesn't use field names as tag names, outputs column type information, and is in correct XML format! +* 'Save as Report' feature when viewing record sets Bug Fixes: * Lots of NULL value in table dump fixes (XML format changed slightly) diff --git a/classes/database/BaseDB.php b/classes/database/BaseDB.php index 2a3da921..c86e6f8f 100644 --- a/classes/database/BaseDB.php +++ b/classes/database/BaseDB.php @@ -4,7 +4,7 @@ * A class that implements the DB interface for Postgres * Note: This class uses ADODB and returns RecordSets. * - * $Id: BaseDB.php,v 1.24 2003/08/12 08:18:54 chriskl Exp $ + * $Id: BaseDB.php,v 1.25 2003/08/18 08:10:16 chriskl Exp $ */ include_once('classes/database/ADODB_base.php'); @@ -123,7 +123,12 @@ class BaseDB extends ADODB_base { function getSelectSQL($table, $show, $values, $nulls, $orderby = array()) { $this->fieldClean($table); - $sql = "SELECT \"" . join('","', $show) . "\" FROM \"{$table}\""; + $sql = "SELECT \"" . join('","', $show) . "\" FROM "; + if ($this->hasSchemas()) { + $this->fieldClean($_REQUEST['schema']); + $sql .= "\"{$_REQUEST['schema']}\"."; + } + $sql .= "\"{$table}\""; // If we have values specified, add them to the WHERE clause $first = true; diff --git a/display.php b/display.php index cec600b3..c3c9f9f2 100644 --- a/display.php +++ b/display.php @@ -9,7 +9,7 @@ * @param $return_desc The return link name * @param $page The current page * - * $Id: display.php,v 1.21 2003/08/05 06:04:36 chriskl Exp $ + * $Id: display.php,v 1.22 2003/08/18 08:10:16 chriskl Exp $ */ // Include application functions @@ -72,7 +72,9 @@ } else echo "

{$lang['strnodata']}

\n"; - echo "

{$_REQUEST['return_desc']}

\n"; + echo "

{$_REQUEST['return_desc']} |\n"; + echo "Save As Report

\n"; $misc->printFooter(); ?> -- 2.39.5