I use a foreign key, that results in a user-database. The user-database have the columns firstname and surname. phpMyAdmin can currently only handle "single fields". With this patch, user is able to create a User-Defined-Function or use a integrated function supported by MySQL eg. CONCAT(surname,' ',firstname). The ToolTip of a foreignkey will now show the full qualified name. Also the dropdowns and the relation-table-viewer lists the full qualified name.
I hope this feature will get released for public use.
INSERT INTO `pma_table_info` (`db_name`, `table_name`, `display_field`) VALUES
('CRM_MINI', 'CRM_POSTITS', 'CONCAT(REFERENCE_TYPE, '' - ID '', REFERENCE_ID)');
Cheers,
Mike.
Patch to enable this feature
I like the idea of this feature. As a matter of fact I had a desire for this a while back but didn't get around to investigating it further.
I see two problems though:
1) the display field which is now configurable as a drop-down list would need to be expanded to also allow for manual input.
2) Deciding weather or not to quote based on a '(' character will someday pose a problem for someone.
This since a '(' is a legitimate character in a MySQL fieldname.
Maybe we could solve (2) by prefixing the SQL function code in display_field.
We have the liberty of changing the format of pmadb tables. For example there could be a new column to hold the expression. The manual input field would be displayed only if this new column exists.
Another thing: if most users will only use this to add a second display field, we could just offer a second drop-down list in the relation view.
Closing due to lack of interest.