0

phpMyAdmin allows me to select a different column to display foreign values, so instead of having to look for the key, I can look for something more understable from human perspective like a city name:

When clicking on "Browse foreign values" I see the key and the description (column I chose to display intead of the key one)

In my case, I am displaying the person name, but of course there duplicate records, so in the end, in some cases it is difficult to me to know which one is the right one. Ideally, I would like phpMyAdmin to display a combo of a few columns that would help me much easier to know the right record. Is this possible? I would like to display first name, last name, and second last name.

In above screenshot, "Description" should display a combo of those columns, instead of just one column.

Thank you!

2 Answers 2

1

phpMyAdmin doesn't offer this feature, but you could get the result you want by creating a virtual column in the foreign table that displays the information you want to see and setting that in phpMyAdmin to be the foreign table's display column. In your case, it would be something like:

ALTER TABLE yourtablename ADD COLUMN referencename TINYTEXT CONCAT(firstname, ' ', lastname, ' ', secondlastname) VIRTUAL;

Virtual columns don't take up storage in your table but are calculated on the fly when accessed.

0

No, the phpMyAdmin interface doesn't currently work that way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.