Jump to content

phpmyadmin help


blanktarget

Recommended Posts

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:

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.