Jump to content


phpmyadmin help

  • Please log in to reply
No replies to this topic

#1 blanktarget

  • Members
  • PipPip
  • Member
  • 12 posts

Posted 03 November 2003 - 11:52 PM

For some reason phpmyadmin is set up by default, to not have linking of foreign keys enabled.
I have done ALL of this:
$cfg[\'Servers\'][$i][\'relation\'] string
Since release 2.2.4 you can describe, in a special \'relation\' table, which field is a key in another table (a foreign key). phpMyAdmin currently uses this to

* make clickable, when you browse the master table, the data values that point to the foreign table;
* display in an optional tool-tip the \"display field\" when browsing the master table, if you move the mouse to a column containing a foreign key (use also the \'table_info\' table);
(see FAQ 6.7)
* in edit/insert mode, display a drop-down list of possible foreign keys (key value and \"display field\" are shown)
(see FAQ 6.21)
* display links on the table properties page, to check referential integrity (display missing foreign keys) for each described key;
* in query-by-example, create automatic joins (see FAQ 6.6)
* enable you to get a PDF schema of your database (also uses the table_coords table).

The keys can be numeric or character.
To allow the usage of this functionality the superuser has to:

* set up \"pmadb\" as described above
* within this database create a table following this scheme:
     CREATE TABLE `pma_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=\'Relation table\';

* put the relation table name in $cfg[\'Servers\'][$i][\'relation\']
* now as normal user open phpMyAdmin and for each one of your tables where you want to use this feature, click \"Structure/Relation view/\" and choose foreign fields.

But the drop down menus in the relation view are empty and don\'t drop down. There is no place for me to set foreign keys. Anyone have this problem before? :evil:
It\'s not that I don\'t know how to do it, i just haven\'t learned it yet.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users