7 mysql workbench get the values of entity reference fields of a content type in a node page I am using MySQLWorkbench queries to update some values. Those values are entity reference fields of a content type.    

 foreach ($node-&gt;field_media_types['und'] as $mt) {
    $media_types[$mt['field_media_type']['und'][0]['value']] = $mt['field_media_file']['und'][0]['value'];} 


The code above is how it is access on a script. I want using MySQLWorkbench  or just MySQL CLI acces those values on quick queries.    

select entity_id, field_media_file_value from field_data_field_media_file order by entity_id desc;    
(0 rows return)  


How do I do it? Is it possible?
Yes it is absolutely possible, and your query you posted is written correctly. If you are returning 0 rows that means there are no records inside the table field_data_field_media_file. Your query literally says to return everything in that table, and 0 things come back.

Review all of the tables in your database and make sure "field_data_field_media_file" is what the field is actually called. Either you are looking at an old/wrong field OR there is simply no nodes with this entity reference field populated.

for your reference the tables relate like this:

The parent node that has the reference

{Node}.nid =&gt; {field_data_field_media_file}.entity_id


The node that is being referenced

{field_data_field_media_file}.field_media_file_value =&gt; {node}.nid