How do I get complete SQL query from Views, the one I could run in mysql directly.For example biggest stumbling block is fields part. Like below
SELECT users_node.uid AS users_node_uid, node.created AS node_created, node.nid AS nid, users_node.mail AS users_node_mail, 'user' AS field_data_field_first_name_user_entity_type, 'user' AS field_data_field_last_name_user_entity_type, 'node' AS field_data_field_purchase_date_node_entity_type, 'node' AS field_data_field_serial_number_node_entity_type FROM {node} node LEFT JOIN {users} users_node ON node.uid = users_node.uid WHERE (( (node.status = '1') AND (node.type IN ('product_registration')) )) ORDER BY node_created DESC LIMIT 50 OFFSET 0
this lines are problematic field_data_field_first_name_user_entity_type, field_data_field_last_name_user_entity_type etc
They are not real fields in DB, they somehow get rewritten somewhere, but I can’t find where and how. How to get the FINAL query to DB in drupal when using views?
p.s. in image, you can see what I get for those fields in phpmyadmin if I run query. Not really useful.
Sponsored by SupremePR