phpMyAdmin foreign key drop-down field values phpMyAdmin foreign key drop-down field values php php

phpMyAdmin foreign key drop-down field values


As i explained on ServerFault:

It is not negaitve number, the feature of phpMYAdmin is to show foreign key value and a custom description field next to it. In the referenced table (Counties) you can go to "Relation view" and under the table there is a select box "Choose field to display", in which you choose value that will be displayed next to CountyID value in the referencing table (Baronies). Also see: phpymadminWiki


You can change the look of this dropdown using the ForeignKeyDropdownOrder option. (See the PMA documentation).

Example:

$cfg['ForeignKeyDropdownOrder'] = array( 'content-id');/* 'content' is the referenced data, 'id' is the key value. */


As Lex said, this is just the way phpMyAdmin displays the values. If you see "-1" or "1-" in that dropdown box, it's just 1.