From 566d4b4f33e80f9433e638052de9eafdee530046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 28 May 2004 14:08:32 +0000 Subject: [PATCH] Default query can contain field names (RFE #948590, patch #961726). --- ChangeLog | 2 ++ Documentation.html | 9 +++++---- config.inc.php | 11 ++++++----- tbl_query_box.php | 11 +++++++---- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f2c37361..119f969f4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ $Source$ 2004-05-28 Michal Čihař * libraries/display_tbl.lib.php: Decrease limit for query truncating (see comments in bug #951744). + * Documentation.html, config.inc.php, tbl_query_box.php: Default query can + contain field names (RFE #948590, patch #961726). 2004-05-26 Michal Čihař * lang/norwegian: Update, thanks to Sven-Erik Andersen - sven-erik. diff --git a/Documentation.html b/Documentation.html index 2e508bacd..b9fc10d9f 100755 --- a/Documentation.html +++ b/Documentation.html @@ -1834,11 +1834,12 @@ Defaults to FALSE (drop-down).


-
$cfg['DefaultQueryTable'] string
-
$cfg['DefaultQueryDatabase'] string
+
$cfg['DefaultQueryTable'] string
+
$cfg['DefaultQueryDatabase'] string
- Default query that will be displayed in query boxes, when user didn't - specify any. Use %d for database name and %t for table name. + Default queries that will be displayed in query boxes when user didn't + specify any. Use %d for database name, %t for table name and %f for a + comma separated list of field names.

diff --git a/config.inc.php b/config.inc.php index 3a450e8b9..a870c6a7c 100644 --- a/config.inc.php +++ b/config.inc.php @@ -532,12 +532,13 @@ $cfg['ReplaceHelpImg'] = TRUE; // show help button instead of strDocume /** - * Default queries. - * %d will be replaced by database name - * %t will be replaced by table name + * Default queries + * %d will be replaced by the database name. + * %t will be replaced by the table name. + * %f will be replaced by a list of field names. */ -$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1'; -$cfg['DefaultQueryDatabase']= ''; +$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1'; +$cfg['DefaultQueryDatabase'] = ''; /** * SQL Query box settings diff --git a/tbl_query_box.php b/tbl_query_box.php index 989657f03..95ae73834 100644 --- a/tbl_query_box.php +++ b/tbl_query_box.php @@ -139,12 +139,15 @@ if (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE) { 0) { ?>