Menu

#457 Add Function-Support to display_field in pma_table_info

closed
nobody
5
2012-04-22
2009-03-19
No

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.

Discussion

  • Herman van Rink

    Herman van Rink - 2009-04-10

    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.

     
  • Marc Delisle

    Marc Delisle - 2009-04-10

    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.

     
  • Marc Delisle

    Marc Delisle - 2012-04-22

    Closing due to lack of interest.

     
  • Marc Delisle

    Marc Delisle - 2012-04-22
    • status: open --> closed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.