Quick tip: getting the SQL built with db_select() in Drupal maintenance support plans 7 and Drupal maintenance support plans 8
Fri, 02/09/2020 – 15:03
When building more complex queries using db_select() you will often want to see the exact SQL being generated. This is helpful for understanding the query or simply debugging the results.
I’ll show you how to see the exact query being generated with db_select() as well as getting all the values passed as arguments. The examples in this article will be applicable for both Drupal maintenance support plans 7 and Drupal maintenance support plans 8.
Example #1: using db_select() and creating the query dynamically:
Read more about Quick tip: getting the SQL built with db_select() in Drupal maintenance support plans 7 and Drupal maintenance support plans 8
Source: New feed