0

I'm working with the data from a Drupal 7 site that I have and I need to extract the data from a table with a relation to another table. The problem is that one of the tables is Node table and the other is field_data_field... that has a target_id.

The queries I have tried are not connecting the data correctly between this tables. I know this because when I go to the content page (http://example.com/ca/content/aalto-erick) the data is not the same.

Is there a way to display the SQL queries that executes the server when displays this content page?

PD: I put the url to show that the info is displaying in a content page.

  • Also show us what you tried and the query you have written for this – Ajay Reddy May 4 '18 at 9:53
1

Yes. The Devel module has a submodule called Web Profiler. Once the Web Profiler module is enabled, there will be toolbar in the footer. The toolbar contains a DB inspection button signified by a DB "stack" with the number of queries performed and the time to perform them. Click the button will show you a profile of the DB queries made in the last request.

  • Important to note that Web Profiler only comes with the Devel's 8.x version and not with 7.x nor 6.x – No Sssweat May 5 '18 at 7:46
0

Yes. The Devel module has "Display query log” settings, You can this or have another way to get this through by hook_query_alter or hook_query_TAG_alter hooks. You can use this reference link.

How To Print SQL String Using Devel Module

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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