From cd4dce6f0e4806b530f9926c64df5d4a2f0d1ff1 Mon Sep 17 00:00:00 2001 From: Mike Beck Date: Sat, 15 Jun 2002 15:15:00 +0000 Subject: [PATCH] last changes to have relationstuff in central db enabled column_comments --- ChangeLog | 19 +++ Documentation.html | 208 ++++++++++++++++------------- Documentation.txt | 172 ++++++++++++++---------- lang/albanian.inc.php3 | 3 +- lang/arabic.inc.php3 | 1 + lang/brazilian_portuguese.inc.php3 | 1 + lang/bulgarian-koi8.inc.php3 | 1 + lang/bulgarian-win1251.inc.php3 | 1 + lang/catala.inc.php3 | 2 +- lang/chinese_big5.inc.php3 | 1 + lang/chinese_gb.inc.php3 | 1 + lang/croatian-iso8859-2.inc.php3 | 1 + lang/croatian-win1250.inc.php3 | 1 + lang/czech-iso.inc.php3 | 1 + lang/czech-utf8.inc.php3 | 1 + lang/czech-win1250.inc.php3 | 1 + lang/danish.inc.php3 | 1 + lang/dutch.inc.php3 | 1 + lang/english-utf8.inc.php3 | 1 + lang/english.inc.php3 | 1 + lang/estonian.inc.php3 | 1 + lang/finnish.inc.php3 | 1 + lang/french.inc.php3 | 1 + lang/galician.inc.php3 | 1 + lang/georgian.inc.php3 | 1 + lang/german-utf8.inc.php3 | 1 + lang/german.inc.php3 | 1 + lang/greek.inc.php3 | 1 + lang/hebrew.inc.php3 | 1 + lang/hungarian.inc.php3 | 1 + lang/indonesian.inc.php3 | 1 + lang/italian.inc.php3 | 1 + lang/japanese-euc.inc.php3 | 1 + lang/japanese-sjis.inc.php3 | 1 + lang/korean.inc.php3 | 1 + lang/latvian.inc.php3 | 1 + lang/lithuanian.inc.php3 | 1 + lang/norwegian.inc.php3 | 1 + lang/polish.inc.php3 | 1 + lang/portuguese.inc.php3 | 1 + lang/romanian.inc.php3 | 1 + lang/russian-koi8.inc.php3 | 1 + lang/russian-win1251.inc.php3 | 1 + lang/serbian-win1250.inc.php3 | 1 + lang/slovak-iso.inc.php3 | 1 + lang/slovak-win1250.inc.php3 | 1 + lang/spanish.inc.php3 | 1 + lang/swedish.inc.php3 | 1 + lang/thai.inc.php3 | 1 + lang/turkish.inc.php3 | 1 + lang/ukrainian-win1251.inc.php3 | 2 +- libraries/display_tbl.lib.php3 | 26 ++-- libraries/relation.lib.php3 | 24 ++++ sql.php3 | 2 + tbl_printview.php3 | 14 +- tbl_relation.php3 | 122 ++++++++++++----- 56 files changed, 420 insertions(+), 219 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a2216aec..962f5900e 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,25 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-06-15 Mike Beck + 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 * lang/romanian.inc.php3 updates, thanks to Valics Lehel * lang/lithuanian.inc.php3 updates, thanks to Vilius Zigmantas diff --git a/Documentation.html b/Documentation.html index 8b6239d06..3bb29cf3c 100755 --- a/Documentation.html +++ b/Documentation.html @@ -163,6 +163,8 @@
  • 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 38 different languages @@ -296,13 +298,15 @@ - ... and if you want to use the bookmark feature: + ... and if you want to use the many new relation and bookmark features:     - GRANT SELECT, INSERT, DELETE ON <bookmark_db>.<bookmark_table> TO 'pma'@'localhost'; + 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) @@ -549,43 +553,62 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'

    -
    - $cfg['Servers'][$i]['bookmarkdb'] string
    - $cfg['Servers'][$i]['bookmarktable'] 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.
    + + To use this functionality as superuser create a new database: +
      +
    • + create a new database for phpmyadmin: + +   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 to + 'pma'@localhost; + + do not give any other user rights on this db. +
    • +
    • + Enter the databasename in $cfg['Servers'][$i]['pmadb'] +
    • +
    +
    + +
    $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 allow the usage of this functionality the superuser has to:
      -
    • - create a table following this scheme:
      +
    • set up a PMA database as described above
    • +
    • within this database create a table following this scheme:
      -      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)
      -      ); +      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';
    • -
    • - 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. -
    • +
    • Enter the tablename in $cfg['Servers'][$i]['bookmarktable']

    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; + the controluser and phpmyadmin as databasename:
    + GRANT SELECT,INSERT,DELETE ON <phpmyadmin> to 'pma'@localhost;

    @@ -625,18 +648,20 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' The keys can be numeric or character.

    - To use this functionality you have to: + To allow the usage of this functionality the superuser has to:
      -
    • - create in the same database a table (for example 'PMA_relation') - following this scheme:
      +
    • set up a PMA database as described above
    • +
    • within this database create a table following this scheme:
      -      CREATE TABLE `PMA_relation` (
      +      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_table`,`master_field`)
      +        PRIMARY KEY (`master_db`,`master_table`,`master_field`),
      +        KEY foreign_field (foreign_db,foreign_table)
           ) TYPE=MyISAM COMMENT='Relation table';
    • @@ -645,18 +670,10 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' $cfg['Servers'][$i]['relation']
    • - 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.

    - 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;
    -

    @@ -670,17 +687,16 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
    This configuration variable will hold the name of this special table. -

    - To use this functionality you have to: + To allow the usage of this functionality the superuser has to:
      -
    • - create in the same database a table (for example - 'PMA_table_info') following this scheme:
      +
    • set up a PMA database as described above
    • +
    • within this database create a table following this scheme:
           CREATE TABLE `PMA_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 (`table_name`)
      +        PRIMARY KEY (`db_name`,`table_name`)
           ) TYPE=MyISAM COMMENT='Table information for phpMyAdmin';
    • @@ -700,80 +716,82 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
      - $cfg['Servers'][$i]['table_coords'] string + $cfg['Servers'][$i]['table_coords'] string
      + $cfg['Servers'][$i]['pdf_pages'] 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. -
      - 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).

      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.

      - To use this functionality you have to: + To allow the usage of this functionality the superuser has to:
        -
      • - create in the same database a table (for example - 'PMA_table_coords') following this scheme:
        +
      • set up a PMA database as described above
      • +
      • within this database create a table following this scheme:
        -      CREATE TABLE `PMA_table_coords` (
        +      CREATE TABLE `table_coords` (
        +        `db_name` varchar(64) NOT NULL default '',
               `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`)
        +        PRIMARY KEY (`db_name`,`table_name`, `pdf_page_number`)
             ) TYPE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output';
      • -
      • - put the table name in - $cfg['Servers'][$i]['table_coords'] -
      • -

      - Usage tips: PDF output. -

      -
      -
      - $cfg['Servers'][$i]['pdf_pages'] string -
      -
      - 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. -
      - This configuration variable will hold the name of this special - table. -

      - 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. -

      - To use this functionality you have to: -
        -
      • - create in the same database a table (for example - 'PMA_pdf_pages') following this scheme:
        +
      • also within this database create:
      • -      CREATE TABLE PMA_pdf_pages (
        -      page_nr int(10) unsigned NOT NULL auto_increment,
        -      page_descr varchar(50) NOT NULL default '',
        -       PRIMARY KEY (page_nr)
        +      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_name),
             ) TYPE=MyISAM COMMENT='PDF Relationpages for PMA';
        -
      • - put the table name in + put the first table name in + $cfg['Servers'][$i]['table_coords'] + and the second table name in $cfg['Servers'][$i]['pdf_pages']

      Usage tips: 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 allow the usage of this functionality the superuser has to: +
        +
      • set up a PMA database as described above
      • +
      • within this database create a table following this scheme:
        + +      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 table name in + $cfg['Servers'][$i]['column_comments'] +
      • +
      +
      $cfg['Servers'][$i]['AllowDeny']['order'] string diff --git a/Documentation.txt b/Documentation.txt index b801d8012..c0822a9d9 100644 --- a/Documentation.txt +++ b/Documentation.txt @@ -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 . TO - 'pma'@'localhost'; + ... and if you want to use the many new relation and bookmark features: + GRANT SELECT, INSERT, DELETE ON 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 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 . 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. diff --git a/lang/albanian.inc.php3 b/lang/albanian.inc.php3 index 413e81ee7..8d74f19eb 100644 --- a/lang/albanian.inc.php3 +++ b/lang/albanian.inc.php3 @@ -403,4 +403,5 @@ $strYes = ' Po '; $strZip = '"kompresuar me zip"'; // To translate -?> \ No newline at end of file +$strComments = 'Comments'; //to translate +?> diff --git a/lang/arabic.inc.php3 b/lang/arabic.inc.php3 index 84f905aa8..95fb671b4 100644 --- a/lang/arabic.inc.php3 +++ b/lang/arabic.inc.php3 @@ -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 ?> diff --git a/lang/brazilian_portuguese.inc.php3 b/lang/brazilian_portuguese.inc.php3 index 130cd4f17..c068025d0 100644 --- a/lang/brazilian_portuguese.inc.php3 +++ b/lang/brazilian_portuguese.inc.php3 @@ -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 ?> diff --git a/lang/bulgarian-koi8.inc.php3 b/lang/bulgarian-koi8.inc.php3 index 7bfbbdbd1..881960360 100644 --- a/lang/bulgarian-koi8.inc.php3 +++ b/lang/bulgarian-koi8.inc.php3 @@ -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 ?> diff --git a/lang/bulgarian-win1251.inc.php3 b/lang/bulgarian-win1251.inc.php3 index 431879d6b..51597f6bc 100644 --- a/lang/bulgarian-win1251.inc.php3 +++ b/lang/bulgarian-win1251.inc.php3 @@ -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 ?> diff --git a/lang/catala.inc.php3 b/lang/catala.inc.php3 index 72f8fd89e..4645ac063 100644 --- a/lang/catala.inc.php3 +++ b/lang/catala.inc.php3 @@ -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 ?> diff --git a/lang/chinese_big5.inc.php3 b/lang/chinese_big5.inc.php3 index 05c6d7e19..a11f8990d 100644 --- a/lang/chinese_big5.inc.php3 +++ b/lang/chinese_big5.inc.php3 @@ -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 ?> diff --git a/lang/chinese_gb.inc.php3 b/lang/chinese_gb.inc.php3 index f02f0f53f..dbe956b28 100644 --- a/lang/chinese_gb.inc.php3 +++ b/lang/chinese_gb.inc.php3 @@ -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 ?> diff --git a/lang/croatian-iso8859-2.inc.php3 b/lang/croatian-iso8859-2.inc.php3 index 4a63458a8..1f37a080d 100644 --- a/lang/croatian-iso8859-2.inc.php3 +++ b/lang/croatian-iso8859-2.inc.php3 @@ -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 ?> diff --git a/lang/croatian-win1250.inc.php3 b/lang/croatian-win1250.inc.php3 index 9fe0b09c8..9be6425d9 100644 --- a/lang/croatian-win1250.inc.php3 +++ b/lang/croatian-win1250.inc.php3 @@ -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 ?> diff --git a/lang/czech-iso.inc.php3 b/lang/czech-iso.inc.php3 index 8296abe97..abd38497a 100644 --- a/lang/czech-iso.inc.php3 +++ b/lang/czech-iso.inc.php3 @@ -403,4 +403,5 @@ $strYes = 'Ano'; $strZip = '"zazipováno"'; // To translate +$strComments = 'Comments'; //to translate ?> diff --git a/lang/czech-utf8.inc.php3 b/lang/czech-utf8.inc.php3 index a52659c3c..1997a17a7 100644 --- a/lang/czech-utf8.inc.php3 +++ b/lang/czech-utf8.inc.php3 @@ -404,4 +404,5 @@ $strYes = 'Ano'; $strZip = '"zazipováno"'; // To translate +$strComments = 'Comments'; //to translate ?> diff --git a/lang/czech-win1250.inc.php3 b/lang/czech-win1250.inc.php3 index 8e8cacb4d..85e531bb3 100644 --- a/lang/czech-win1250.inc.php3 +++ b/lang/czech-win1250.inc.php3 @@ -403,4 +403,5 @@ $strYes = 'Ano'; $strZip = '"zazipováno"'; // To translate +$strComments = 'Comments'; //to translate ?> diff --git a/lang/danish.inc.php3 b/lang/danish.inc.php3 index 27675e01b..bc421f76b 100644 --- a/lang/danish.inc.php3 +++ b/lang/danish.inc.php3 @@ -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 ?> diff --git a/lang/dutch.inc.php3 b/lang/dutch.inc.php3 index 97dca9e1b..6401a5594 100644 --- a/lang/dutch.inc.php3 +++ b/lang/dutch.inc.php3 @@ -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 ?> diff --git a/lang/english-utf8.inc.php3 b/lang/english-utf8.inc.php3 index e9326fcd0..f1f64861f 100644 --- a/lang/english-utf8.inc.php3 +++ b/lang/english-utf8.inc.php3 @@ -397,4 +397,5 @@ $strWrongUser = 'Wrong username/password. Access denied.'; $strYes = 'Yes'; $strZip = '"zipped"'; +$strComments = 'Comments'; //to translate ?> diff --git a/lang/english.inc.php3 b/lang/english.inc.php3 index 70dfc5ef0..b158184c5 100644 --- a/lang/english.inc.php3 +++ b/lang/english.inc.php3 @@ -396,4 +396,5 @@ $strWrongUser = 'Wrong username/password. Access denied.'; $strYes = 'Yes'; $strZip = '"zipped"'; +$strComments = 'Comments'; //to translate ?> diff --git a/lang/estonian.inc.php3 b/lang/estonian.inc.php3 index 5afdc86a0..62b3fbc8d 100644 --- a/lang/estonian.inc.php3 +++ b/lang/estonian.inc.php3 @@ -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 ?> diff --git a/lang/finnish.inc.php3 b/lang/finnish.inc.php3 index 42b4c5f68..162891009 100644 --- a/lang/finnish.inc.php3 +++ b/lang/finnish.inc.php3 @@ -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 ?> diff --git a/lang/french.inc.php3 b/lang/french.inc.php3 index a8b0359c8..9122192d2 100644 --- a/lang/french.inc.php3 +++ b/lang/french.inc.php3 @@ -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 ?> diff --git a/lang/galician.inc.php3 b/lang/galician.inc.php3 index 5f86af0a8..d74cf97c6 100644 --- a/lang/galician.inc.php3 +++ b/lang/galician.inc.php3 @@ -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 ?> diff --git a/lang/georgian.inc.php3 b/lang/georgian.inc.php3 index f5f78217c..452eb0edf 100644 --- a/lang/georgian.inc.php3 +++ b/lang/georgian.inc.php3 @@ -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 ?> diff --git a/lang/german-utf8.inc.php3 b/lang/german-utf8.inc.php3 index 44166efe3..0096fae4c 100644 --- a/lang/german-utf8.inc.php3 +++ b/lang/german-utf8.inc.php3 @@ -405,4 +405,5 @@ $strWrongUser = 'Falscher Benutzername/Kennwort. Zugriff verweigert.'; $strYes = 'Ja'; $strZip = 'Zip komprimiert'; +$strComments = 'Comments'; //to translate ?> diff --git a/lang/german.inc.php3 b/lang/german.inc.php3 index 1b41452b3..fb1f3c0d2 100644 --- a/lang/german.inc.php3 +++ b/lang/german.inc.php3 @@ -404,4 +404,5 @@ $strWrongUser = 'Falscher Benutzername/Kennwort. Zugriff verweigert.'; $strYes = 'Ja'; $strZip = 'Zip komprimiert'; +$strComments = 'Comments'; //to translate ?> diff --git a/lang/greek.inc.php3 b/lang/greek.inc.php3 index 51d8aaccb..0bedfd846 100644 --- a/lang/greek.inc.php3 +++ b/lang/greek.inc.php3 @@ -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 ?> diff --git a/lang/hebrew.inc.php3 b/lang/hebrew.inc.php3 index 69335e58c..9aeda4a5c 100644 --- a/lang/hebrew.inc.php3 +++ b/lang/hebrew.inc.php3 @@ -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 ?> diff --git a/lang/hungarian.inc.php3 b/lang/hungarian.inc.php3 index db3b6a68f..7d14a876e 100644 --- a/lang/hungarian.inc.php3 +++ b/lang/hungarian.inc.php3 @@ -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 ?> diff --git a/lang/indonesian.inc.php3 b/lang/indonesian.inc.php3 index 36f2e629f..35686e5c5 100644 --- a/lang/indonesian.inc.php3 +++ b/lang/indonesian.inc.php3 @@ -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 ?> diff --git a/lang/italian.inc.php3 b/lang/italian.inc.php3 index 4d98d4c16..77131f1f8 100644 --- a/lang/italian.inc.php3 +++ b/lang/italian.inc.php3 @@ -405,4 +405,5 @@ $strZip = '"compresso con zip"'; // To translate +$strComments = 'Comments'; //to translate ?> diff --git a/lang/japanese-euc.inc.php3 b/lang/japanese-euc.inc.php3 index e0a737ef3..77f333e7c 100644 --- a/lang/japanese-euc.inc.php3 +++ b/lang/japanese-euc.inc.php3 @@ -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 ?> diff --git a/lang/japanese-sjis.inc.php3 b/lang/japanese-sjis.inc.php3 index 6c745e6c1..62dc91299 100644 --- a/lang/japanese-sjis.inc.php3 +++ b/lang/japanese-sjis.inc.php3 @@ -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 ?> diff --git a/lang/korean.inc.php3 b/lang/korean.inc.php3 index 6444ef179..90010db4e 100644 --- a/lang/korean.inc.php3 +++ b/lang/korean.inc.php3 @@ -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 ?> diff --git a/lang/latvian.inc.php3 b/lang/latvian.inc.php3 index 4315cb3f8..64a620f76 100644 --- a/lang/latvian.inc.php3 +++ b/lang/latvian.inc.php3 @@ -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 ?> diff --git a/lang/lithuanian.inc.php3 b/lang/lithuanian.inc.php3 index 67470f7b6..d2f6ce29c 100644 --- a/lang/lithuanian.inc.php3 +++ b/lang/lithuanian.inc.php3 @@ -398,4 +398,5 @@ $strYes = 'Taip'; $strZip = '"zip"'; //to translate: +$strComments = 'Comments'; //to translate ?> diff --git a/lang/norwegian.inc.php3 b/lang/norwegian.inc.php3 index f206b964b..89589a5f2 100644 --- a/lang/norwegian.inc.php3 +++ b/lang/norwegian.inc.php3 @@ -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 ?> diff --git a/lang/polish.inc.php3 b/lang/polish.inc.php3 index 254c037bb..8eb5dd9dc 100644 --- a/lang/polish.inc.php3 +++ b/lang/polish.inc.php3 @@ -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 ?> diff --git a/lang/portuguese.inc.php3 b/lang/portuguese.inc.php3 index 96b0e5a33..0f02d6104 100644 --- a/lang/portuguese.inc.php3 +++ b/lang/portuguese.inc.php3 @@ -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 ?> diff --git a/lang/romanian.inc.php3 b/lang/romanian.inc.php3 index ba49d87e2..2bc01934c 100644 --- a/lang/romanian.inc.php3 +++ b/lang/romanian.inc.php3 @@ -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 ?> diff --git a/lang/russian-koi8.inc.php3 b/lang/russian-koi8.inc.php3 index 36ae92378..a0ed82bbb 100644 --- a/lang/russian-koi8.inc.php3 +++ b/lang/russian-koi8.inc.php3 @@ -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 ?> diff --git a/lang/russian-win1251.inc.php3 b/lang/russian-win1251.inc.php3 index 792f28274..649f27f93 100644 --- a/lang/russian-win1251.inc.php3 +++ b/lang/russian-win1251.inc.php3 @@ -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 ?> diff --git a/lang/serbian-win1250.inc.php3 b/lang/serbian-win1250.inc.php3 index b404adb37..027b5e624 100644 --- a/lang/serbian-win1250.inc.php3 +++ b/lang/serbian-win1250.inc.php3 @@ -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 ?> diff --git a/lang/slovak-iso.inc.php3 b/lang/slovak-iso.inc.php3 index d97b57a31..e55f8cb73 100644 --- a/lang/slovak-iso.inc.php3 +++ b/lang/slovak-iso.inc.php3 @@ -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 ?> diff --git a/lang/slovak-win1250.inc.php3 b/lang/slovak-win1250.inc.php3 index 233dec4c6..8e361170b 100644 --- a/lang/slovak-win1250.inc.php3 +++ b/lang/slovak-win1250.inc.php3 @@ -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 ?> diff --git a/lang/spanish.inc.php3 b/lang/spanish.inc.php3 index 5c63d25f5..f8d08715b 100644 --- a/lang/spanish.inc.php3 +++ b/lang/spanish.inc.php3 @@ -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 ?> diff --git a/lang/swedish.inc.php3 b/lang/swedish.inc.php3 index 5f3de096b..45a2b48fb 100644 --- a/lang/swedish.inc.php3 +++ b/lang/swedish.inc.php3 @@ -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 ?> diff --git a/lang/thai.inc.php3 b/lang/thai.inc.php3 index 407072205..697967705 100644 --- a/lang/thai.inc.php3 +++ b/lang/thai.inc.php3 @@ -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 ?> diff --git a/lang/turkish.inc.php3 b/lang/turkish.inc.php3 index adb34626d..21220a5c8 100644 --- a/lang/turkish.inc.php3 +++ b/lang/turkish.inc.php3 @@ -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 ?> diff --git a/lang/ukrainian-win1251.inc.php3 b/lang/ukrainian-win1251.inc.php3 index 83621606f..391da9c5b 100644 --- a/lang/ukrainian-win1251.inc.php3 +++ b/lang/ukrainian-win1251.inc.php3 @@ -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 ?> diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index eb2a2d354..dc87c4386 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -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 diff --git a/libraries/relation.lib.php3 b/libraries/relation.lib.php3 index 0e7072c61..a5d86df5c 100644 --- a/libraries/relation.lib.php3 +++ b/libraries/relation.lib.php3 @@ -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 + */ + 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 ?> diff --git a/sql.php3 b/sql.php3 index 728404db0..72c5b3e82 100755 --- a/sql.php3 +++ b/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 diff --git a/tbl_printview.php3 b/tbl_printview.php3 index 608b33c38..b9cf79250 100755 --- a/tbl_printview.php3 +++ b/tbl_printview.php3 @@ -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 '' . ucfirst($strLinksTo) . ''; } + if($cfgRelation['commwork']) { + echo '' . ucfirst($strComments) . ''; + } echo "\n"; ?> @@ -250,6 +255,13 @@ while (list($key, $table) = each($the_tables)) { echo ' '; } echo "\n"; + if($cfgRelation['commwork']) { + echo ''; + if(isset($comments[$field_name])) { + echo htmlspecialchars($comments[$field_name]); + } + echo ' '; + } ?> 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) { - - + - + @@ -235,8 +259,46 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) { + + + + + + + +
       
      - - +
      + + + + + + + + + + + + +
      + +
      + +
      + +