last changes to have relationstuff in central db
enabled column_comments
This commit is contained in:
19
ChangeLog
19
ChangeLog
@@ -5,6 +5,25 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2002-06-15 Mike Beck <mikebeck@users.sourceforge.net>
|
||||
more changes because of new centralized db for pma
|
||||
* db_details_structure.php3
|
||||
* pdf_pages.php3
|
||||
* pdf_schema.php3
|
||||
* libraries/display_tbl.lib.php3
|
||||
now also honour new place of relationtables
|
||||
* Documentation.html
|
||||
* Documentation.txt
|
||||
described new db and tables
|
||||
* db_details_links.php3
|
||||
- put the link to tbl_qbe in topnavigation
|
||||
* tbl_relation.php3
|
||||
writing of column_comments possible
|
||||
* tbl_printview.php3
|
||||
column_comments will be displayed
|
||||
* relation.lib.php3
|
||||
new function: getComments($db,$table)
|
||||
|
||||
2002-06-15 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/romanian.inc.php3 updates, thanks to Valics Lehel
|
||||
* lang/lithuanian.inc.php3 updates, thanks to Vilius Zigmantas
|
||||
|
@@ -163,6 +163,8 @@
|
||||
<li>export (*) and import data to CSV values</li>
|
||||
<li>administer multiple servers and single databases</li>
|
||||
<li>check referential integrity</li>
|
||||
<li>create complex Queries automatically connecting required tables</li>
|
||||
<li>create PDF graphics of your Database layout</li>
|
||||
<li>
|
||||
communicate in more than
|
||||
<a class="navigation" href="./translators.html">38 different languages</a>
|
||||
@@ -296,13 +298,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
... and if you want to use the bookmark feature:
|
||||
... and if you want to use the many new relation and bookmark features:
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<tt>GRANT SELECT, INSERT, DELETE ON <bookmark_db>.<bookmark_table> TO 'pma'@'localhost';</tt>
|
||||
<tt>GRANT SELECT, INSERT, DELETE ON <pma_db> TO 'pma'@'localhost';</tt>
|
||||
(this of course requires you to have a special DB for phpMyAdmin, the contents
|
||||
will be explained later)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -549,43 +553,62 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
<b>$cfg['Servers'][$i]['bookmarkdb']</b> string<br />
|
||||
<b>$cfg['Servers'][$i]['bookmarktable']</b> string
|
||||
</dt>
|
||||
<dt><b>$cfg['Servers'][$i]['pmadb']</b> string</dt>
|
||||
<dd>
|
||||
Starting with Version 2.3.0 phpMyAdmin offers a lot of Features
|
||||
to work with Master / Foreign - Tables. To use those as well as
|
||||
the bookmarkfeature you will need to create a new db.<br />
|
||||
|
||||
To use this functionality as superuser create a new database:
|
||||
<ul>
|
||||
<li>
|
||||
create a new database for phpmyadmin:
|
||||
<tt>
|
||||
CREATE database phpmyadmin;
|
||||
</tt>
|
||||
Note that controluser must have SELECT, INSERT and DELETE
|
||||
privileges on the bookmark table. Here is a query to set up
|
||||
those privileges (using "pma" as the controluser:
|
||||
<tt>
|
||||
GRANT SELECT,INSERT,DELETE ON <pmadb> to
|
||||
'pma'@localhost;
|
||||
</tt>
|
||||
do <b>not</b> give any other user rights on this db.
|
||||
</li>
|
||||
<li>
|
||||
Enter the databasename in <tt>$cfg['Servers'][$i]['pmadb']</tt>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<a name="bookmark"></a>
|
||||
<dt><b>$cfg['Servers'][$i]['bookmarktable']</b> string</dt>
|
||||
<dd>
|
||||
Since release 2.2.0 phpMyAdmin allows to bookmark queries. This can be
|
||||
useful for queries you often run.<br /><br />
|
||||
|
||||
To use this functionality you have to:
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
<ul>
|
||||
<li>
|
||||
create a table following this scheme:<br />
|
||||
<li>set up a PMA database as described above</li>
|
||||
<li>within this database create a table following this scheme:<br />
|
||||
<tt>
|
||||
CREATE TABLE bookmark (<br />
|
||||
id int(11) DEFAULT '0' NOT NULL auto_increment,<br />
|
||||
dbase varchar(255) NOT NULL,<br />
|
||||
user varchar(255) NOT NULL,<br />
|
||||
label varchar(255) NOT NULL,<br />
|
||||
query text NOT NULL,<br />
|
||||
PRIMARY KEY (id)<br />
|
||||
);
|
||||
CREATE TABLE bookmark (
|
||||
id int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
dbase varchar(255) NOT NULL,
|
||||
user varchar(255) NOT NULL,
|
||||
label varchar(255) NOT NULL,
|
||||
query text NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM COMMENT='Bookmarks';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>
|
||||
then complete the two variables
|
||||
<tt>$cfg['Servers'][$i]['bookmarkdb']</tt> and
|
||||
<tt>$cfg['Servers'][$i]['bookmarktable']</tt> with the database
|
||||
and table names you've choosen so phpMyAdmin will be able to
|
||||
find the bookmarks.
|
||||
</li>
|
||||
<li>Enter the tablename in <tt>$cfg['Servers'][$i]['bookmarktable']</tt></li>
|
||||
</ul><br />
|
||||
|
||||
Note that <tt>controluser</tt> must have <tt>SELECT</tt>,
|
||||
<tt>INSERT</tt> and <tt>DELETE</tt> privileges on the bookmark table.
|
||||
Here is a query to set up those privileges (using "pma" as
|
||||
the controluser:<br />
|
||||
<tt>GRANT SELECT,INSERT,DELETE ON <bookmarkdb>.<bookmarktable> to 'pma'@localhost;</tt>
|
||||
the controluser and phpmyadmin as databasename:<br />
|
||||
<tt>GRANT SELECT,INSERT,DELETE ON <phpmyadmin> to 'pma'@localhost;</tt>
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
@@ -625,18 +648,20 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
||||
The keys can be numeric or character.
|
||||
<br /><br />
|
||||
|
||||
To use this functionality you have to:
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
<ul>
|
||||
<li>
|
||||
create in the same database a table (for example 'PMA_relation')
|
||||
following this scheme:<br />
|
||||
<li>set up a PMA database as described above</li>
|
||||
<li>within this database create a table following this scheme:<br />
|
||||
<tt>
|
||||
CREATE TABLE `PMA_relation` (<br />
|
||||
CREATE TABLE `relation` (<br />
|
||||
`master_db` varchar(64) NOT NULL default '',<br />
|
||||
`master_table` varchar(64) NOT NULL default '',<br />
|
||||
`master_field` varchar(64) NOT NULL default '',<br />
|
||||
`foreign_db` varchar(64) NOT NULL default '',<br />
|
||||
`foreign_table` varchar(64) NOT NULL default '',<br />
|
||||
`foreign_field` varchar(64) NOT NULL default '',<br />
|
||||
PRIMARY KEY (`master_table`,`master_field`)<br />
|
||||
PRIMARY KEY (`master_db`,`master_table`,`master_field`),<br />
|
||||
KEY foreign_field (foreign_db,foreign_table)<br />
|
||||
) TYPE=MyISAM COMMENT='Relation table';<br />
|
||||
</tt>
|
||||
</li>
|
||||
@@ -645,18 +670,10 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
||||
<tt>$cfg['Servers'][$i]['relation']</tt>
|
||||
</li>
|
||||
<li>
|
||||
then manually fill the relation table with information about
|
||||
the keys.
|
||||
now as normal user open phpMyAdmin and for each table where you want to use this feature,
|
||||
click "Structure/Relation view/" and choose foreign fields.
|
||||
</li>
|
||||
</ul><br />
|
||||
If you created a relation table before release 2.3.0, you can upgrade
|
||||
it with those commands, assuming your table name is "PMA_relation":<br />
|
||||
<tt>
|
||||
ALTER TABLE `PMA_relation` CHANGE src_table master_table VARCHAR(64) NOT NULL;<br />
|
||||
ALTER TABLE `PMA_relation` CHANGE src_column master_field VARCHAR(64) NOT NULL;<br />
|
||||
ALTER TABLE `PMA_relation` CHANGE dest_table foreign_table VARCHAR(64) NOT NULL;<br />
|
||||
ALTER TABLE `PMA_relation` CHANGE dest_column foreign_field VARCHAR(64) NOT NULL;<br />
|
||||
</tt><br />
|
||||
</dd>
|
||||
|
||||
<a name="table_info"></a>
|
||||
@@ -670,17 +687,16 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
||||
<br />
|
||||
This configuration variable will hold the name of this special
|
||||
table.
|
||||
<br /><br />
|
||||
To use this functionality you have to:
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
<ul>
|
||||
<li>
|
||||
create in the same database a table (for example
|
||||
'PMA_table_info') following this scheme:<br />
|
||||
<li>set up a PMA database as described above</li>
|
||||
<li>within this database create a table following this scheme:<br />
|
||||
<tt>
|
||||
CREATE TABLE `PMA_table_info` (<br />
|
||||
`db_name` varchar(64) NOT NULL default '',<br />
|
||||
`table_name` varchar(64) NOT NULL default '',<br />
|
||||
`display_field` varchar(64) NOT NULL default '',<br />
|
||||
PRIMARY KEY (`table_name`)<br />
|
||||
PRIMARY KEY (`db_name`,`table_name`)<br />
|
||||
) TYPE=MyISAM COMMENT='Table information for phpMyAdmin';<br />
|
||||
</tt>
|
||||
</li>
|
||||
@@ -700,80 +716,82 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
||||
|
||||
<a name="table_coords"></a>
|
||||
<dt>
|
||||
<b>$cfg['Servers'][$i]['table_coords']</b> string
|
||||
<b>$cfg['Servers'][$i]['table_coords']</b> string<br />
|
||||
<b>$cfg['Servers'][$i]['pdf_pages']</b> string
|
||||
</dt>
|
||||
<dd>
|
||||
Since release 2.3.0 you can describe, in a special 'table_coords'
|
||||
table, the coordinates where each table will be placed on a PDF schema
|
||||
output.
|
||||
<br />
|
||||
This configuration variable will hold the name of this special
|
||||
table.
|
||||
Since release 2.3.0 you can have phpMyAdmin create PDF Pages showing the
|
||||
relations between your tables. To do this it needs two tables 'pdf_pages'
|
||||
(storing information about the available pdf Pages)
|
||||
and 'table_coords' (storing coordinates where each table will be placed
|
||||
on a PDF schema output).
|
||||
<br /><br />
|
||||
PDF output is supported under PHP4, and you must be using also the
|
||||
'relation' feature and have a table of PDF Pages (see $cfg['Servers'][$i]['pdf_pages']).
|
||||
Also, we used the fpdf library which currently
|
||||
only supports iso-8859 (Latin1) character sets in PDF.
|
||||
<br /><br />
|
||||
To use this functionality you have to:
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
<ul>
|
||||
<li>
|
||||
create in the same database a table (for example
|
||||
'PMA_table_coords') following this scheme:<br />
|
||||
<li>set up a PMA database as described above</li>
|
||||
<li>within this database create a table following this scheme:<br />
|
||||
<tt>
|
||||
CREATE TABLE `PMA_table_coords` (<br />
|
||||
CREATE TABLE `table_coords` (<br />
|
||||
`db_name` varchar(64) NOT NULL default '',<br />
|
||||
`table_name` varchar(64) NOT NULL default '',<br />
|
||||
`pdf_page_number` int NOT NULL default '0',<br />
|
||||
`x` float unsigned NOT NULL default '0',<br />
|
||||
`y` float unsigned NOT NULL default '0',<br />
|
||||
PRIMARY KEY (`table_name`, `pdf_page_number`)<br />
|
||||
PRIMARY KEY (`db_name`,`table_name`, `pdf_page_number`)<br />
|
||||
) TYPE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>
|
||||
put the table name in
|
||||
<tt>$cfg['Servers'][$i]['table_coords']</tt>
|
||||
</li>
|
||||
</ul><br />
|
||||
Usage tips: <a class="navigation" href="#faqpdf">PDF output</a>.
|
||||
<br /><br />
|
||||
</dd>
|
||||
<dt>
|
||||
<b>$cfg['Servers'][$i]['pdf_pages']</b> string
|
||||
</dt>
|
||||
<dd>
|
||||
Since release 2.3.0 you can describe, in a special 'pdf_pages'
|
||||
table, which pages you want to be able to create as PDF.
|
||||
<br />
|
||||
This configuration variable will hold the name of this special
|
||||
table.
|
||||
<br /><br />
|
||||
PDF output is supported under PHP4, and you must be using also the
|
||||
'relation' feature and have a table of PDF Pages (see $cfg['Servers'][$i]['pdf_pages']).
|
||||
Also, we used the fpdf library which currently
|
||||
only supports iso-8859 (Latin1) character sets in PDF.
|
||||
<br /><br />
|
||||
To use this functionality you have to:
|
||||
<ul>
|
||||
<li>
|
||||
create in the same database a table (for example
|
||||
'PMA_pdf_pages') following this scheme:<br />
|
||||
<li>also within this database create:</li>
|
||||
<tt>
|
||||
CREATE TABLE PMA_pdf_pages (<br />
|
||||
page_nr int(10) unsigned NOT NULL auto_increment,<br />
|
||||
page_descr varchar(50) NOT NULL default '',<br />
|
||||
PRIMARY KEY (page_nr)<br />
|
||||
CREATE TABLE pdf_pages (<br />
|
||||
`db_name` varchar(64) NOT NULL default '',<br />
|
||||
page_nr int(10) unsigned NOT NULL auto_increment,<br />
|
||||
page_descr varchar(50) NOT NULL default '',<br />
|
||||
PRIMARY KEY (page_nr),<br />
|
||||
KEY (db_name),<br />
|
||||
) TYPE=MyISAM COMMENT='PDF Relationpages for PMA';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>
|
||||
put the table name in
|
||||
put the first table name in
|
||||
<tt>$cfg['Servers'][$i]['table_coords']</tt>
|
||||
and the second table name in
|
||||
<tt>$cfg['Servers'][$i]['pdf_pages']</tt>
|
||||
</li>
|
||||
</ul><br />
|
||||
Usage tips: <a class="navigation" href="#faqpdf">PDF output</a>.
|
||||
<br /><br />
|
||||
</dd>
|
||||
<dt><b>$cfg['Servers'][$i]['column_comments']</b> string</dt>
|
||||
<dd>
|
||||
Since release 2.3.0 you can store comments to describe each column
|
||||
for each table. These will then be shown on the printview.
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
<ul>
|
||||
<li>set up a PMA database as described above</li>
|
||||
<li>within this database create a table following this scheme:<br />
|
||||
<tt>
|
||||
CREATE TABLE column_comments (
|
||||
id int(5) unsigned NOT NULL auto_increment,
|
||||
db_name varchar(64) NOT NULL default '',
|
||||
table_name varchar(64) NOT NULL default '',
|
||||
column_name varchar(64) NOT NULL default '',
|
||||
comment varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY db_name (db_name,table_name,column_name)
|
||||
) TYPE=MyISAM COMMENT='Comments for Columns';
|
||||
</tt>
|
||||
</li>
|
||||
<li>
|
||||
put the table name in
|
||||
<tt>$cfg['Servers'][$i]['column_comments']</tt>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
<b>$cfg['Servers'][$i]['AllowDeny']['order']</b> string
|
||||
|
@@ -46,6 +46,8 @@ Introduction
|
||||
* export (*) and import data to CSV values
|
||||
* administer multiple servers and single databases
|
||||
* check referential integrity
|
||||
* create complex Queries automatically connecting required tables
|
||||
* create PDF graphics of your Database layout
|
||||
* communicate in more than [21]38 different languages
|
||||
|
||||
(*) phpMyAdmin can compress (Zip, GZip -RFC 1952- or Bzip2 formats)
|
||||
@@ -132,9 +134,10 @@ Installation
|
||||
GRANT SELECT ON mysql.db TO 'pma'@'localhost';
|
||||
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON
|
||||
mysql.tables_priv TO 'pma'@'localhost';
|
||||
... and if you want to use the bookmark feature:
|
||||
GRANT SELECT, INSERT, DELETE ON <bookmark_db>.<bookmark_table> TO
|
||||
'pma'@'localhost';
|
||||
... and if you want to use the many new relation and bookmark features:
|
||||
GRANT SELECT, INSERT, DELETE ON <pma_db> TO 'pma'@'localhost';
|
||||
(this of course requires you to have a special DB for phpMyAdmin, the contents
|
||||
will be explained later)
|
||||
* Then each of the true users should be granted of a set of
|
||||
privileges on a set of particular databases but shouldn't have any
|
||||
global privileges. For example, to grant the user real_user with
|
||||
@@ -307,13 +310,26 @@ CRIPT_NAME'], '/')+1);
|
||||
you want to show only certain databases on your system, for
|
||||
example.
|
||||
|
||||
$cfg['Servers'][$i]['bookmarkdb'] string
|
||||
$cfg['Servers'][$i]['pmadb'] string
|
||||
Starting with Version 2.3.0 phpMyAdmin offers a lot of Features
|
||||
to work with Master / Foreign - Tables. To use those as well as
|
||||
the bookmarkfeature you will need to create a new db.
|
||||
|
||||
$cfg['Servers'][$i]['bookmarktable'] string
|
||||
Since release 2.2.0 phpMyAdmin allows to bookmark queries. This
|
||||
can be useful for queries you often run.
|
||||
To use this functionality you have to:
|
||||
To use this functionality as superuser create a new database:
|
||||
CREATE database phpmyadmin;
|
||||
Note that controluser must have SELECT, INSERT and DELETE
|
||||
privileges on the bookmark table. Here is a query to set up
|
||||
those privileges (using "pma" as the controluser:
|
||||
GRANT SELECT,INSERT,DELETE ON <pmadb> to
|
||||
'pma'@localhost;
|
||||
do _not_ give any other user rights on this db.
|
||||
|
||||
+ create a table following this scheme:
|
||||
Enter the databasename in $cfg['Servers'][$i]['pmadb']
|
||||
$cfg['Servers'][$i]['bookmarktable'] string
|
||||
Inside your phpMyAdmin Databse create a table following this scheme:
|
||||
CREATE TABLE bookmark (
|
||||
id int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
dbase varchar(255) NOT NULL,
|
||||
@@ -322,17 +338,7 @@ CRIPT_NAME'], '/')+1);
|
||||
query text NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
+ then complete the two variables
|
||||
$cfg['Servers'][$i]['bookmarkdb'] and
|
||||
$cfg['Servers'][$i]['bookmarktable'] with the database and
|
||||
table names you've choosen so phpMyAdmin will be able to find
|
||||
the bookmarks.
|
||||
|
||||
Note that controluser must have SELECT, INSERT and DELETE
|
||||
privileges on the bookmark table. Here is a query to set up
|
||||
those privileges (using "pma" as the controluser:
|
||||
GRANT SELECT,INSERT,DELETE ON <bookmarkdb>.<bookmarktable> to
|
||||
'pma'@localhost;
|
||||
and add the name in $cfg['Servers'][$i]['bookmarktable']
|
||||
|
||||
$cfg['Servers'][$i]['relation'] string
|
||||
Since release 2.2.4 you can describe, in a special 'relation'
|
||||
@@ -353,38 +359,25 @@ CRIPT_NAME'], '/')+1);
|
||||
the table_coords table).
|
||||
|
||||
The keys can be numeric or character.
|
||||
To use this functionality you have to:
|
||||
To use this functionality you have to
|
||||
+ set up a PMA database as
|
||||
described above and inside this database create a table:
|
||||
|
||||
CREATE TABLE relation (
|
||||
master_db varchar(64) NOT NULL default '',
|
||||
master_table varchar(64) NOT NULL default '',
|
||||
master_field varchar(64) NOT NULL default '',
|
||||
foreign_db varchar(64) NOT NULL default '',
|
||||
foreign_table varchar(64) NOT NULL default '',
|
||||
foreign_field varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (master_db,master_table,master_field),
|
||||
KEY foreign_field (foreign_db,foreign_table)
|
||||
) TYPE=MyISAM COMMENT='Table Relation';
|
||||
|
||||
+ create in the same database a table (for example
|
||||
'PMA_relation') following this scheme:
|
||||
CREATE TABLE `PMA_relation` (
|
||||
`master_table` varchar(64) NOT NULL default '',
|
||||
`master_field` varchar(64) NOT NULL default '',
|
||||
`foreign_table` varchar(64) NOT NULL default '',
|
||||
`foreign_field` varchar(64) NOT NULL default '',
|
||||
`pdf_page_number` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`master_table`,`master_field`),
|
||||
KEY pdf_page_number (`pdf_page_number`)
|
||||
) TYPE=MyISAM COMMENT='Relation table';
|
||||
+ put the relation table name in
|
||||
$cfg['Servers'][$i]['relation']
|
||||
+ then manually fill the relation table with information about
|
||||
the keys.
|
||||
|
||||
If you created a relation table before release 2.3.0, you can
|
||||
upgrade it with those commands, assuming your table name is
|
||||
"PMA_relation":
|
||||
ALTER TABLE `PMA_relation` CHANGE src_table master_table
|
||||
VARCHAR(64) NOT NULL
|
||||
ALTER TABLE `PMA_relation` CHANGE src_column master_field
|
||||
VARCHAR(64) NOT NULL
|
||||
ALTER TABLE `PMA_relation` CHANGE dest_table foreign_table
|
||||
VARCHAR(64) NOT NULL
|
||||
ALTER TABLE `PMA_relation` CHANGE dest_column
|
||||
foreign_field VARCHAR(64) NOT NULL
|
||||
ALTER TABLE `PMA_relation` ADD `pdf_page_number` int(11)
|
||||
NOT NULL;
|
||||
ALTER TABLE `PMA_relation` ADD INDEX(`pdf_page_number`);
|
||||
+ on the tablestructure page you will find a link to edit
|
||||
a tables relation which you can use to fill this table.
|
||||
|
||||
$cfg['Servers'][$i]['table_info'] string
|
||||
Since release 2.3.0 you can describe, in a special 'table_info'
|
||||
@@ -392,16 +385,16 @@ CRIPT_NAME'], '/')+1);
|
||||
the cursor over the corresponding key.
|
||||
This configuration variable will hold the name of this special
|
||||
table.
|
||||
To use this functionality you have to:
|
||||
|
||||
+ create in the same database a table (for example
|
||||
'PMA_table_info') following this scheme:
|
||||
CREATE TABLE `PMA_table_info` (
|
||||
`table_name` varchar(64) NOT NULL default '',
|
||||
`display_field` varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (`table_name`)
|
||||
) TYPE=MyISAM COMMENT='Table information for
|
||||
phpMyAdmin';
|
||||
+ To use this functionality you have to set up a PMA database as
|
||||
described above and inside this database create a table:
|
||||
CREATE TABLE table_info (
|
||||
db_name varchar(64) NOT NULL default '',
|
||||
table_name varchar(64) NOT NULL default '',
|
||||
display_field varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (db_name,table_name)
|
||||
) TYPE=MyISAM COMMENT='Table information for phpMyAdmin';
|
||||
|
||||
+ put the table name in $cfg['Servers'][$i]['table_info']
|
||||
+ then for each table where you want to use this feature, click
|
||||
"Structure/Relation view/Choose field to display" to choose
|
||||
@@ -410,9 +403,11 @@ CRIPT_NAME'], '/')+1);
|
||||
Usage tip: [41]Display field.
|
||||
|
||||
$cfg['Servers'][$i]['table_coords'] string
|
||||
Since release 2.3.0 you can describe, in a special
|
||||
'table_coords' table, the coordinates where each table will be
|
||||
placed on a PDF schema output.
|
||||
$cfg['Servers'][$i]['pdf_pages'] string
|
||||
Since release 2.3.0 you can have phpMyAdmin create a PDF showing
|
||||
the relations within your Database. To use this feature you will
|
||||
need a table that stores the PDF pages to create and the Coordinates
|
||||
of Tables to use per page.
|
||||
This configuration variable will hold the name of this special
|
||||
table.
|
||||
PDF output is supported under PHP4, and you must be using also
|
||||
@@ -421,21 +416,49 @@ CRIPT_NAME'], '/')+1);
|
||||
PDF.
|
||||
To use this functionality you have to:
|
||||
|
||||
+ create in the same database a table (for example
|
||||
'PMA_table_coords') following this scheme:
|
||||
CREATE TABLE `PMA_table_coords` (
|
||||
`table_name` varchar(64) NOT NULL default '',
|
||||
`pdf_page_number` int NOT NULL default '0',
|
||||
`x` float unsigned NOT NULL default '0',
|
||||
`y` float unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`table_name`, `pdf_page_number`)
|
||||
) TYPE=MyISAM COMMENT='Table coordinates for phpMyAdmin
|
||||
PDF output';
|
||||
+ put the table name in $cfg['Servers'][$i]['table_coords']
|
||||
+ then manually fill this table with information about the
|
||||
table positions on the PDF schema.
|
||||
+ set up a PMA database as described above
|
||||
+ inside this database create a table:
|
||||
CREATE TABLE table_coords (
|
||||
db_name varchar(64) NOT NULL default '',
|
||||
table_name varchar(64) NOT NULL default '',
|
||||
pdf_page_number int(11) NOT NULL default '0',
|
||||
x float unsigned NOT NULL default '0',
|
||||
y float unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (db_name,table_name,pdf_page_number)
|
||||
) TYPE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output';
|
||||
+ Also in the PMA database create the following table:
|
||||
CREATE TABLE pdf_pages (
|
||||
db_name varchar(64) NOT NULL default '',
|
||||
page_nr int(10) unsigned NOT NULL auto_increment,
|
||||
page_descr varchar(50) NOT NULL default '',
|
||||
PRIMARY KEY (page_nr),
|
||||
KEY db (db_name)
|
||||
) TYPE=MyISAM COMMENT='PDF Relationpages for PMA';
|
||||
|
||||
+ put the first tables name in $cfg['Servers'][$i]['table_coords']
|
||||
+ put the second tables name in $cfg['Servers'][$i]['pdf_pages']
|
||||
+ on the bottom of the structurepage for databases there is a link
|
||||
to create pdf pages, and once you created one also one to have the
|
||||
pdf created
|
||||
|
||||
Usage tips: [42]PDF output.
|
||||
$cfg['Servers'][$i]['column_comments'] string
|
||||
Since release 2.3.0 you can store comments to describe each column
|
||||
for each table. These will then be shown on the printview.
|
||||
To use this functionality you have to:
|
||||
|
||||
+ set up a PMA database as described above
|
||||
+ inside this database create a table:
|
||||
CREATE TABLE column_comments (
|
||||
id int(5) unsigned NOT NULL auto_increment,
|
||||
db_name varchar(64) NOT NULL default '',
|
||||
table_name varchar(64) NOT NULL default '',
|
||||
column_name varchar(64) NOT NULL default '',
|
||||
comment varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY db_name (db_name,table_name,column_name)
|
||||
) TYPE=MyISAM COMMENT='Comments for Columns';
|
||||
+ put the tables name in $cfg['Servers'][$i]['column_comments']
|
||||
|
||||
$cfg['Servers'][$i]['AllowDeny']['order'] string
|
||||
If your rule order is empty, then IP authentication is
|
||||
@@ -1097,8 +1120,9 @@ FAQ - Frequently Asked Questions
|
||||
|
||||
How can I use the relation table in Query-by-example?
|
||||
Here is an example with the tables persons, towns and countries. If
|
||||
you don't have a PMA_relation table, create it as explained in the
|
||||
configuration section. Then create the example tables:
|
||||
you don't have a PMA Database and a relation table, create it as
|
||||
explained in the configuration section or beg your provider to do so.
|
||||
Then create the example tables:
|
||||
CREATE TABLE countries (
|
||||
country_code char(1) NOT NULL default '',
|
||||
description varchar(10) NOT NULL default '',
|
||||
@@ -1139,7 +1163,7 @@ FAQ - Frequently Asked Questions
|
||||
* Click "Submit query"
|
||||
|
||||
How can I use the "display field" feature?
|
||||
Starting from the previous example, create the PMA_table_info as
|
||||
Starting from the previous example, create the PMA.table_info as
|
||||
explained in the configuration section, then browse your persons
|
||||
table, and move the mouse over a town code or country code.
|
||||
|
||||
|
@@ -403,4 +403,5 @@ $strYes = ' Po ';
|
||||
$strZip = '"kompresuar me zip"';
|
||||
|
||||
// To translate
|
||||
?>
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -404,4 +404,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -402,4 +402,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -403,4 +403,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -403,4 +403,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -399,5 +399,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -405,4 +405,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -405,4 +405,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -403,4 +403,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -403,4 +403,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -403,4 +403,5 @@ $strYes = 'Ano';
|
||||
$strZip = '"zazipov<6F>no"';
|
||||
|
||||
// To translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -404,4 +404,5 @@ $strYes = 'Ano';
|
||||
$strZip = '"zazipováno"';
|
||||
|
||||
// To translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -403,4 +403,5 @@ $strYes = 'Ano';
|
||||
$strZip = '"zazipov<6F>no"';
|
||||
|
||||
// To translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -397,4 +397,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -400,4 +400,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -397,4 +397,5 @@ $strWrongUser = 'Wrong username/password. Access denied.';
|
||||
$strYes = 'Yes';
|
||||
|
||||
$strZip = '"zipped"';
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -396,4 +396,5 @@ $strWrongUser = 'Wrong username/password. Access denied.';
|
||||
$strYes = 'Yes';
|
||||
|
||||
$strZip = '"zipped"';
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -398,4 +398,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -402,4 +402,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -397,4 +397,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -402,4 +402,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -407,4 +407,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -405,4 +405,5 @@ $strWrongUser = 'Falscher Benutzername/Kennwort. Zugriff verweigert.';
|
||||
$strYes = 'Ja';
|
||||
|
||||
$strZip = 'Zip komprimiert';
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -404,4 +404,5 @@ $strWrongUser = 'Falscher Benutzername/Kennwort. Zugriff verweigert.';
|
||||
$strYes = 'Ja';
|
||||
|
||||
$strZip = 'Zip komprimiert';
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -399,4 +399,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -398,4 +398,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -401,4 +401,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -400,4 +400,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -405,4 +405,5 @@ $strZip = '"compresso con zip"';
|
||||
|
||||
// To translate
|
||||
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -408,4 +408,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -407,4 +407,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -399,4 +399,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -402,4 +402,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -398,4 +398,5 @@ $strYes = 'Taip';
|
||||
$strZip = '"zip"';
|
||||
|
||||
//to translate:
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -401,4 +401,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -400,4 +400,5 @@ $strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for cha
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -405,4 +405,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -399,4 +399,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -403,4 +403,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -403,4 +403,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -404,4 +404,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -402,4 +402,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -401,4 +401,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -395,4 +395,5 @@ $strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string funct
|
||||
$strHaveToShow = 'You have to choose at least one Column to display'; //to translate
|
||||
$strMissingBracket = 'Missing Bracket'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -397,4 +397,5 @@ $strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string funct
|
||||
$strHaveToShow = 'You have to choose at least one Column to display'; //to translate
|
||||
$strMissingBracket = 'Missing Bracket'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -409,4 +409,5 @@ $strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for cha
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -398,4 +398,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -398,5 +398,5 @@ $strHaveToShow = 'You have to choose at least one Column to display'; //to tran
|
||||
$strCantLoadRecodeIconv = 'Can not load iconv or recode extension needed for charset conversion, configure php to allow using these extensions or disable charset conversion in phpMyAdmin.'; //to translate
|
||||
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.'; //to translate
|
||||
$strMySQLCharset = 'MySQL Charset'; //to translate
|
||||
|
||||
$strComments = 'Comments'; //to translate
|
||||
?>
|
||||
|
@@ -1320,6 +1320,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
global $sql_query, $num_rows, $unlim_num_rows, $pos, $fields_meta, $fields_cnt;
|
||||
global $vertical_display, $disp_direction, $repeat_cells;
|
||||
global $dontlimitchars;
|
||||
global $cfgRelation;
|
||||
|
||||
// 1. ----- Prepares the work -----
|
||||
|
||||
@@ -1392,31 +1393,24 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
// init map
|
||||
$map = array();
|
||||
|
||||
if (!empty($cfg['Server']['relation'])) {
|
||||
if ($cfgRelation['relwork']) {
|
||||
// find tables
|
||||
$pattern = '`?[[:space:]]+(((ON|on)[[:space:]]+[^,]+)?,|((NATURAL|natural)[[:space:]]+)?(INNER|inner|LEFT|left|RIGHT|right)([[:space:]]+(OUTER|outer))?[[:space:]]+(JOIN|join))[[:space:]]*`?';
|
||||
$target = eregi_replace('^.*[[:space:]]+FROM[[:space:]]+`?|`?[[:space:]]*(ON[[:space:]]+[^,]+)?(WHERE[[:space:]]+.*)?$', '', $sql_query);
|
||||
$tabs = '(\'' . join('\',\'', split($pattern, $target)) . '\')';
|
||||
|
||||
$local_query = 'SELECT master_field, foreign_table, foreign_field'
|
||||
. ' FROM ' . PMA_backquote($cfg['Server']['relation'])
|
||||
. ' WHERE master_table IN ' . $tabs;
|
||||
$result = @PMA_mysql_query($local_query);
|
||||
$local_query = 'SELECT master_field, foreign_db, foreign_table, foreign_field'
|
||||
. ' FROM ' . PMA_backquote($cfgRelation['relation'])
|
||||
. ' WHERE master_db = \'' . $db . '\''
|
||||
. ' AND master_table IN ' . $tabs;
|
||||
$result = @PMA_query_as_cu($local_query);
|
||||
if ($result) {
|
||||
while ($rel = PMA_mysql_fetch_row($result)) {
|
||||
// check for display field?
|
||||
if (!empty($cfg['Server']['table_info'])) {
|
||||
$ti_query = 'SELECT display_field'
|
||||
. ' FROM ' . PMA_backquote($cfg['Server']['table_info'])
|
||||
. ' WHERE table_name = \'' . PMA_sqlAddslashes($rel[1]) . '\'';
|
||||
$result_ti = @PMA_mysql_query($ti_query);
|
||||
if ($result_ti) {
|
||||
list($display_field) = PMA_mysql_fetch_row($result_ti);
|
||||
} else {
|
||||
$display_field = '';
|
||||
}
|
||||
if ($cfgRelation['displaywork']) {
|
||||
$display_field = getDisplayField($db,$rel[2]);
|
||||
} // end if
|
||||
$map[$rel[0]] = array($rel[1], $rel[2], $display_field);
|
||||
$map[$rel[0]] = array($rel[2], $rel[3], $display_field);
|
||||
} // end while
|
||||
} // end if
|
||||
} // end 2b
|
||||
|
@@ -167,5 +167,29 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the comments for all rows of a table
|
||||
* @return arry [field_name] = comment
|
||||
* @global array the list of Relationsettings
|
||||
* @access public
|
||||
* @author Mike Beck <mikebeck@users.sourceforge.net>
|
||||
*/
|
||||
function getComments($db,$table) {
|
||||
global $cfgRelation;
|
||||
$_com_qry = 'SELECT column_name,comment FROM ' . PMA_backquote($cfgRelation['column_comments'])
|
||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
||||
$_com_rs = PMA_query_as_cu($_com_qry);
|
||||
while ($row = @PMA_mysql_fetch_array($_com_rs)) {
|
||||
$col = $row['column_name'];
|
||||
$comment[$col] = $row['comment'];
|
||||
} // end while
|
||||
|
||||
if(is_array($comment)) {
|
||||
return $comment;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
} // end function getComments
|
||||
} // $__PMA_RELATION_LIB__INCLUDED
|
||||
?>
|
||||
|
2
sql.php3
2
sql.php3
@@ -397,6 +397,8 @@ else {
|
||||
$js_to_run = 'functions.js';
|
||||
include('./header.inc.php3');
|
||||
include('./libraries/bookmark.lib.php3');
|
||||
include('./libraries/relation.lib.php3');
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
}
|
||||
|
||||
// Gets the list of fields properties
|
||||
|
@@ -12,7 +12,9 @@ if (!isset($selected_tbl)) {
|
||||
require('./libraries/relation.lib.php3');
|
||||
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
if ($cfgRelation['commwork']) {
|
||||
$comments = getComments($db,$table);
|
||||
}
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
@@ -176,6 +178,9 @@ while (list($key, $table) = each($the_tables)) {
|
||||
if ($have_rel) {
|
||||
echo '<th>' . ucfirst($strLinksTo) . '</th>';
|
||||
}
|
||||
if($cfgRelation['commwork']) {
|
||||
echo '<th>' . ucfirst($strComments) . '</th>';
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</tr>
|
||||
@@ -250,6 +255,13 @@ while (list($key, $table) = each($the_tables)) {
|
||||
echo ' </td>';
|
||||
}
|
||||
echo "\n";
|
||||
if($cfgRelation['commwork']) {
|
||||
echo '<td bgcolor="' . $bgcolor . '" nowrap="nowrap">';
|
||||
if(isset($comments[$field_name])) {
|
||||
echo htmlspecialchars($comments[$field_name]);
|
||||
}
|
||||
echo ' </td>';
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
|
@@ -54,15 +54,7 @@ if ($cfgRelation['relwork']
|
||||
. ' AND master_field = \'' . PMA_sqlAddslashes($key) . '\'';
|
||||
} // end if... else....
|
||||
if(isset($upd_query)){
|
||||
if (isset($dbh)) {
|
||||
mysql_select_db($cfgRelation['db'],$dbh);
|
||||
$upd_rs = PMA_mysql_query($upd_query, $dbh) or PMA_mysqlDie(mysql_error($dbh), $upd_query, '', $err_url_0);
|
||||
mysql_select_db($db,$dbh);
|
||||
} else {
|
||||
mysql_select_db($cfgRelation['db']);
|
||||
$upd_rs = PMA_mysql_query($upd_query, $GLOBALS['dbh']) or PMA_mysqlDie('', $upd_query, '', $err_url_0);
|
||||
mysql_select_db($db);
|
||||
}
|
||||
$upd_rs = PMA_query_as_cu($upd_query);
|
||||
}
|
||||
} // end while
|
||||
} // end if
|
||||
@@ -84,24 +76,54 @@ if ($cfgRelation['displaywork']
|
||||
. '\'' . PMA_sqlAddslashes($display_field) .'\')';
|
||||
}
|
||||
if(isset($upd_query)){
|
||||
if (isset($dbh)) {
|
||||
mysql_select_db($cfgRelation['db'],$dbh);
|
||||
$upd_rs = PMA_mysql_query($upd_query, $dbh) or PMA_mysqlDie(mysql_error($dbh), $upd_query, '', $err_url_0);
|
||||
mysql_select_db($db,$dbh);
|
||||
} else {
|
||||
mysql_select_db($cfgRelation['db']);
|
||||
$upd_rs = PMA_mysql_query($upd_query, $GLOBALS['dbh']) or PMA_mysqlDie('', $upd_query, '', $err_url_0);
|
||||
mysql_select_db($db);
|
||||
}
|
||||
$upd_rs = PMA_query_as_cu($upd_query);
|
||||
}
|
||||
} // end if
|
||||
|
||||
if($cfgRelation['commwork']
|
||||
&& isset($submit_comm) && $submit_comm == 'true') {
|
||||
while (list($key,$value) = each($comment)) {
|
||||
$test_qry = 'SELECT comment FROM ' . PMA_backquote($cfgRelation['column_comments'])
|
||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
||||
. ' AND column_name = \'' . PMA_sqlAddslashes($key) . '\'';
|
||||
$test_rs = PMA_query_as_cu($test_qry);
|
||||
if(mysql_num_rows($test_rs)>0) {
|
||||
if(strlen($value)>0){
|
||||
$upd_query = 'UPDATE ' . PMA_backquote($cfgRelation['column_comments'])
|
||||
. ' SET comment = \'' . PMA_sqlAddslashes($value) . '\''
|
||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
||||
. ' AND column_name = \'' . PMA_sqlAddslashes($key) . '\'';
|
||||
} else {
|
||||
$upd_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['column_comments'])
|
||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
||||
. ' AND column_name = \'' . PMA_sqlAddslashes($key) . '\'';
|
||||
}
|
||||
} else if (strlen($value)>0){
|
||||
$upd_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['column_comments'])
|
||||
. ' (db_name,table_name,column_name,comment) '
|
||||
. ' VALUES(\'' . PMA_sqlAddslashes($db) . '\','
|
||||
. '\'' . PMA_sqlAddslashes($table) . '\','
|
||||
. '\'' . PMA_sqlAddslashes($key) . '\','
|
||||
. '\'' . PMA_sqlAddslashes($value) . '\')';
|
||||
}
|
||||
if(isset($upd_query)){
|
||||
$upd_rs = PMA_query_as_cu($upd_query);
|
||||
}
|
||||
} // end while (transferred data)
|
||||
} // end if (commwork)
|
||||
|
||||
// now that we might have changed we have to see again
|
||||
if ($cfgRelation['relwork']) {
|
||||
$existrel = getForeigners($db,$table);
|
||||
$existrel = getForeigners($db,$table);
|
||||
}
|
||||
if ($cfgRelation['displaywork']) {
|
||||
$disp = getDisplayField($db,$table);
|
||||
$disp = getDisplayField($db,$table);
|
||||
}
|
||||
if ($cfgRelation['commwork']) {
|
||||
$comments = getComments($db,$table);
|
||||
}
|
||||
/**
|
||||
* Dialog
|
||||
@@ -155,24 +177,26 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) {
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="center"><b><?php echo $strLinksTo; ?></b></td>
|
||||
<th colspan=2 align="center"><b><?php echo $strLinksTo; ?></b></th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
while ($row = PMA_mysql_fetch_array($col_rs)) {
|
||||
echo "\n";
|
||||
$save_row[] = $row;
|
||||
}
|
||||
for ($i=0;$i<count($save_row);$i++){
|
||||
echo "\n";
|
||||
?>
|
||||
<tr>
|
||||
<th><?php echo $row[0]; ?></th>
|
||||
<th><?php echo $save_row[$i]['Field']; ?></th>
|
||||
<td>
|
||||
<input type="hidden" name="src_field" value="<?php echo $row['Field']; ?>" />
|
||||
<select name="destination[<?php echo htmlspecialchars($row['Field']); ?>]">
|
||||
<input type="hidden" name="src_field" value="<?php echo $save_row[$i]['Field']; ?>" />
|
||||
<select name="destination[<?php echo htmlspecialchars($save_row[$i]['Field']); ?>]">
|
||||
<?php
|
||||
echo "\n";
|
||||
reset($selectboxall);
|
||||
while (list($key, $value) = each($selectboxall)) {
|
||||
$myfield = $row['Field'];
|
||||
$myfield = $save_row[$i]['Field'];
|
||||
if(isset($existrel[$myfield])){
|
||||
$test = $existrel[$myfield]['foreign_db'] . '.'
|
||||
. $existrel[$myfield]['foreign_table'] . '.'
|
||||
@@ -192,7 +216,7 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) {
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
} // end while
|
||||
} // end for
|
||||
|
||||
echo "\n";
|
||||
?>
|
||||
@@ -235,8 +259,46 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) {
|
||||
<input type="submit" value="<?php echo $strGo; ?>" />
|
||||
</form>
|
||||
<?php
|
||||
} // end if
|
||||
} // end if
|
||||
} // end if (displayworks)
|
||||
if($cfgRelation['commwork']) {
|
||||
?>
|
||||
<form method="post" action="tbl_relation.php3">
|
||||
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
||||
<input type="hidden" name="server" value="<?php echo $server; ?>" />
|
||||
<input type="hidden" name="db" value="<?php echo $db; ?>" />
|
||||
<input type="hidden" name="table" value="<?php echo $table; ?>" />
|
||||
<input type="hidden" name="submit_comm" value="true" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan=2 align="center"><b><?php echo $strComments; ?></b></th>
|
||||
</tr>
|
||||
<?php
|
||||
for ($i=0;$i<count($save_row);$i++){
|
||||
$field =$save_row[$i]['Field'];
|
||||
echo "\n";
|
||||
?>
|
||||
<tr>
|
||||
<th><?php echo $field; ?></th>
|
||||
<td>
|
||||
<input type="text" name="comment[<?php echo $field;?>]" value="<?php echo htmlspecialchars($comments[$field]);?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
} // end for
|
||||
|
||||
echo "\n";
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<input type="submit" value="<?php echo $strGo; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
} // end if (comments work)
|
||||
} // end if (we have columns in this table)
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user