examples
This commit is contained in:
@@ -665,6 +665,7 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
<li>which field is to be displayed as a tooltip when moving the
|
<li>which field is to be displayed as a tooltip when moving the
|
||||||
cursor over the corresponding key</li>
|
cursor over the corresponding key</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<br />
|
||||||
This configuration variable will hold the name of this special
|
This configuration variable will hold the name of this special
|
||||||
table.
|
table.
|
||||||
<br /><br />
|
<br /><br />
|
||||||
@@ -693,10 +694,11 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
then manually fill this table with information about the table
|
then manually fill this table with information about the table
|
||||||
positions on the PDF schema, and/or the display field.
|
positions on the PDF schema, and/or the display fields.
|
||||||
</li>
|
</li>
|
||||||
</ul><br />
|
</ul><br />
|
||||||
See also this <a class="navigation" href="#faqpdf">usage tip.</a>
|
Usage tips: <a class="navigation" href="#faqpdf">PDF output</a> and
|
||||||
|
<a class="navigation" href="#faqdisplay">display field</a>.
|
||||||
<br /><br />
|
<br /><br />
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
@@ -1710,8 +1712,10 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
<p>
|
<p>
|
||||||
<b>How can I use the relation table in Query-by-example?</b>
|
<b>How can I use the relation table in Query-by-example?</b>
|
||||||
<br />
|
<br />
|
||||||
Here is an example with the tables persons, towns and countries. Start
|
Here is an example with the tables persons, towns and countries. If you
|
||||||
by creating this: <br /><br />
|
don't have a PMA_relation table, create it as explained in the
|
||||||
|
configuration section. Then create the example tables:
|
||||||
|
<br /><br />
|
||||||
<tt>
|
<tt>
|
||||||
CREATE TABLE countries (<br />
|
CREATE TABLE countries (<br />
|
||||||
country_code char(1) NOT NULL default '',<br />
|
country_code char(1) NOT NULL default '',<br />
|
||||||
@@ -1732,19 +1736,6 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
INSERT INTO persons VALUES (11, 'Marc', 'S', '');<br />
|
INSERT INTO persons VALUES (11, 'Marc', 'S', '');<br />
|
||||||
INSERT INTO persons VALUES (15, 'Paul', 'S', 'C');<br />
|
INSERT INTO persons VALUES (15, 'Paul', 'S', 'C');<br />
|
||||||
<br />
|
<br />
|
||||||
CREATE TABLE `PMA_relation` (<br />
|
|
||||||
master_table varchar(64) NOT NULL default '',<br />
|
|
||||||
master_field varchar(64) NOT NULL default '',<br />
|
|
||||||
foreign_table varchar(64) NOT NULL default '',<br />
|
|
||||||
foreign_field varchar(64) NOT NULL default '',<br />
|
|
||||||
pdf_page_number int(11) NOT NULL default '0',<br />
|
|
||||||
PRIMARY KEY (master_table,master_field),<br />
|
|
||||||
KEY pdf_page_number (`pdf_page_number`)<br />
|
|
||||||
) TYPE=MyISAM;<br />
|
|
||||||
<br />
|
|
||||||
INSERT INTO `PMA_relation` VALUES ('persons', 'town_code', 'towns', 'town_code', 1);<br />
|
|
||||||
INSERT INTO `PMA_relation` VALUES ('persons', 'country_code', 'countries', 'country_code', 1);<br />
|
|
||||||
<br />
|
|
||||||
CREATE TABLE towns (<br />
|
CREATE TABLE towns (<br />
|
||||||
town_code varchar(5) NOT NULL default '0',<br />
|
town_code varchar(5) NOT NULL default '0',<br />
|
||||||
description varchar(30) NOT NULL default '',<br />
|
description varchar(30) NOT NULL default '',<br />
|
||||||
@@ -1753,6 +1744,9 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
<br />
|
<br />
|
||||||
INSERT INTO towns VALUES ('S', 'Sherbrooke');<br />
|
INSERT INTO towns VALUES ('S', 'Sherbrooke');<br />
|
||||||
INSERT INTO towns VALUES ('M', 'Montr<74>al');<br />
|
INSERT INTO towns VALUES ('M', 'Montr<74>al');<br />
|
||||||
|
<br />
|
||||||
|
INSERT INTO `PMA_relation` VALUES ('persons', 'town_code', 'towns', 'town_code', 1);<br />
|
||||||
|
INSERT INTO `PMA_relation` VALUES ('persons', 'country_code', 'countries', 'country_code', 1);<br />
|
||||||
</tt>
|
</tt>
|
||||||
<br />
|
<br />
|
||||||
Then test like this:
|
Then test like this:
|
||||||
@@ -1772,6 +1766,22 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
</ul>
|
</ul>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
<a name="faqdisplay"></a>
|
||||||
|
<p>
|
||||||
|
<b>How can I use the "display field" feature?</b>
|
||||||
|
<br />
|
||||||
|
Starting from the previous example, create the PMA_table_info as explained
|
||||||
|
in the configuration section, then:
|
||||||
|
<br /><br />
|
||||||
|
<tt>
|
||||||
|
INSERT INTO `PMA_table_info` (table_name, display_field) VALUES ('towns', 'description');<br />
|
||||||
|
INSERT INTO `PMA_table_info` (table_name, display_field) VALUES ('countries', 'description');<br />
|
||||||
|
</tt>
|
||||||
|
<br />
|
||||||
|
Then browse your persons table, and move the mouse over a town code or
|
||||||
|
country code.
|
||||||
|
|
||||||
|
|
||||||
<a name="faqpdf"></a>
|
<a name="faqpdf"></a>
|
||||||
<p>
|
<p>
|
||||||
<b>How can I produce a PDF schema of my database?</b>
|
<b>How can I produce a PDF schema of my database?</b>
|
||||||
|
1216
Documentation.txt
1216
Documentation.txt
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user