0

In phpmyadmin, relation view, there is a selection to choose a default display column which is very handy with foreign keys.

I'd like to get this column name in php but where is this information stored?

I've searched in information_schema but I can't find it anywhere.

1 Answer 1

0

The information is stored in a database called phpmyadmin. To obtain that information issue a query like this:

SELECT `display_field`
FROM `phpmyadmin`.`pma_table_info`
WHERE `db_name` = 'your_db' AND `table_name` = 'your_table'
2
  • Locally it works fine but on my website I receive the error: SELECT command denied to user, is this a webhost issue? Mar 4, 2013 at 19:43
  • You'll have to grant read access to that database for your web application. You can do it using phpmyadmin for example
    – hek2mgl
    Mar 4, 2013 at 19:49

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.