Below is the list of changes that have just been committed into a local
mysqldoc repository of MHillyer. When MHillyer does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.1926 04/08/05 19:20:25 MHillyer@doomhammer. +2 -0
Changed and new content for query browser docs.
Docs/query-browser-en-images/dynamiclist.png
1.1 04/08/05 19:20:24 MHillyer@doomhammer. +277 -0
Docs/query-browser-en.xml
1.10 04/08/05 19:20:24 MHillyer@doomhammer. +124 -23
Tag changes, added using sections on master-detail and code editing.
Docs/query-browser-en-images/dynamiclist.png
1.0 04/08/05 19:20:24 MHillyer@doomhammer. +0 -0
BitKeeper file C:/cygwin/home/MHillyer/mysqldoc/Docs/query-browser-en-images/dynamiclist.png
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: MHillyer
# Host: doomhammer.
# Root: C:/cygwin/home/MHillyer/mysqldoc
--- 1.9/Docs/query-browser-en.xml 2004-08-05 15:16:15 -06:00
+++ 1.10/Docs/query-browser-en.xml 2004-08-05 19:20:24 -06:00
@@ -546,8 +546,8 @@
The center panel provides buttons for query management. The
<guibutton>Explain</guibutton> button can be used to get the
<literal>EXPLAIN</literal> output for the current query from the
- MySQL server, while the <guibutton>Compare</guibutton> button will allow
- you to compare the results of two queries graphically.
+ MySQL server, while the <guibutton>Compare</guibutton> button will
+ allow you to compare the results of two queries graphically.
</para>
<para>
@@ -905,13 +905,13 @@
<para>
Once a table is selected, you can choose specific columns to query;
- click the <guibutton>Select</guibutton> button from the query building
- buttons on the button bar. Your mouse pointer will now change to a
- <literal>Select</literal> pointer, which you can use to choose
- fields from the schema browser. For example, by clicking on the Id,
- Name, and Country fields of the World sample database, the query
- <literal>SELECT C.Id, C.Name, C.Country FROM City C</literal> will
- be built in the query area.
+ click the <guibutton>Select</guibutton> button from the query
+ building buttons on the button bar. Your mouse pointer will now
+ change to a <literal>Select</literal> pointer, which you can use to
+ choose fields from the schema browser. For example, by clicking on
+ the Id, Name, and Country fields of the World sample database, the
+ query <literal>SELECT C.Id, C.Name, C.Country FROM City C</literal>
+ will be built in the query area.
</para>
<para>
@@ -928,9 +928,12 @@
<para>
You can change between the different query building pointers by
clicking on the query building buttons in the button bar, or by
- using a combination of <keycap>Ctrl</keycap>+<keycap>Alt</keycap> and the first
- letter of the pointer you wish to use (<keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>S</keycap>
- for <literal>SELECT</literal>, <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>W</keycap> for <literal>WHERE</literal>).
+ using a combination of <keycap>Ctrl</keycap>+<keycap>Alt</keycap>
+ and the first letter of the pointer you wish to use
+ (<keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>S</keycap> for
+ <literal>SELECT</literal>,
+ <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>W</keycap> for
+ <literal>WHERE</literal>).
</para>
</sect1>
@@ -952,11 +955,11 @@
You can navigate the tabsheet using the arrow keys, tab key, and
PageUp/PageDown keys. The Home and End keys can be used to move to
the first and last column within a given row. The
- <guibutton>First</guibutton> and <guibutton>Last</guibutton> buttons at the
- bottom of the tabsheet can be used to move to the first and last
- rows of the resultset. The <guibutton>Search</guibutton> button at the
- bottom of the tabsheet can be used to find a specific value within
- the tabsheet.
+ <guibutton>First</guibutton> and <guibutton>Last</guibutton> buttons
+ at the bottom of the tabsheet can be used to move to the first and
+ last rows of the resultset. The <guibutton>Search</guibutton> button
+ at the bottom of the tabsheet can be used to find a specific value
+ within the tabsheet.
</para>
</sect1>
@@ -977,9 +980,9 @@
[MH] THIS WILL CHANGE, UPDATE WHEN APPROPRIATE
</remark>
- To edit a resultset click the <guibutton>Edit</guibutton> button. If the
- <guibutton>Edit</guibutton> button is not active, your resultset is not
- editable.
+ To edit a resultset click the <guibutton>Edit</guibutton> button. If
+ the <guibutton>Edit</guibutton> button is not active, your resultset
+ is not editable.
</para>
<para>
@@ -1063,19 +1066,117 @@
</sect1>
- <sect1 id="mysql-query-browser-using-master_detail">
+<!-- END COMPARING RECORDSETS -->
+
+ <sect1 id="mysql-query-browser-using-masterdetail">
<title>
Creating Master-Detail Views
</title>
- <para></para>
+ <para>
+ MySQL Query Browser makes it easy to view data that is in a
+ master-detail (one to many) relationship. This can be useful for
+ viewing customer/order data, group/member data, etc.
+ </para>
+
+ <para>
+ To display a master-detail view, first query the master table in a
+ new tabsheet. For example, using the World sample database, you
+ could issue a query like <literal>SELECT Code, Name, Continent FROM
+ Country</literal>.
+ </para>
+
+ <para>
+ Once you have created the master resultset, right-click on the
+ tabsheet and choose the <guimenu>Split Tab Vertically</guimenu>
+ option. For the detail query, create a query that uses the dynamic
+ parameters available from the master query, as seen in the parameter
+ browser. In this example, we could query the City table like this:
+ <literal>SELECT Id, Name FROM City WHERE Country = :Code</literal>.
+ </para>
+
+ <para>
+ The colon character indicates to the MySQL Query Browser that you
+ are adding a dynamic parameter, and a pop-up list of available
+ parameters should appear within the query area, allowing you to
+ choose a dynamic parameter using the arrow keys. You can also type
+ the name of the field from the master resultset that you would like
+ to use to link the detail query.
+ </para>
+
+ <figure>
+ <title>
+ The dynamic parameter list
+ </title>
+ <graphic fileref="query-browser-en-images/dynamiclist.png" lang="en" format="PNG"/>
+ </figure>
+
+ <para>
+ Once you execute the detail query it will automatically refresh any
+ time you change the active row in the master query, allowing you to
+ quickly see all detail rows as you navigate the master resultset.
+ </para>
+
+ <para>
+ You can repeat this process, splitting the tabsheet additional
+ times, allowing you to have detail resultsets for detail resultsets.
+ </para>
</sect1>
<!-- END MASTER DETAIL -->
-<!-- END COMPARING RECORDSETS -->
+ <sect1 id="mysql-query-browser-using-codeedit">
+
+ <title>
+ Editing Queries From a Development Tool
+ </title>
+
+ <para>
+ In order to help programmers optimize and troubleshoot their queries
+ more effectively, the MySQL Query Browser can copy queries from
+ application code using your favorite IDE.
+ </para>
+
+ <para>
+ <emphasis>This functionality is only available for the Windows
+ version of MySQL Query Browser.</emphasis>
+ </para>
+
+ <para>
+ The following PHP code will be used as an example:
+
+<programlisting>
+ $SQL = "SELECT Id, Name, Country FROM City";
+ mysql_query($SQL,$db);
+ </programlisting>
+
+ To copy the listing into the MySQL Query Browser, highlight the
+ first line from within your editor and press <keycap>Ctrl</keycap> +
+ <keycap>Alt</keycap> + <keycap>Shift</keycap> + <keycap>C</keycap>.
+ The non-query portions of the line will be stripped and the query
+ will be pasted into the query area.
+ </para>
+
+ <para>
+ After editing the query, press <keycap>Ctrl</keycap> +
+ <keycap>Alt</keycap> + <keycap>Shift</keycap> + <keycap>V</keycap>
+ to load the modified query back into your original code. The
+ surrounding PHP code will be re-inserted along with the modified
+ query. This functionality will allow you to edit queries quickly
+ while programming.
+ </para>
+
+ <para>
+ In order to use this functionality your editing application will
+ need to support the standard Windows clipboard system, which most
+ applications do.
+ </para>
+
+ </sect1>
+
+<!-- END CODE EDIT -->
</chapter>
--- New file ---
+++ Docs/query-browser-en-images/dynamiclist.png 04/08/05 19:20:24
| Thread |
|---|
| • bk commit - mysqldoc tree (MHillyer:1.1926) | mhillyer | 6 Aug |