2 added links to the documentation pages
source | link

For displaying query youYou can use dpq() functiondpq() to display the query, and dpr() to display printthe result dpr()

Example

$query = db_select('users','u'); $query->fields('u'); $query->condition('u.uid',1042); $result = $query->execute()->fetchAll();

dpq($query); // For Displaying Query dpr($result); // For Displaying Query results

  $query = db_select('users','u');
  $query->fields('u');
  $query->condition('u.uid', 1042);
  $result = $query->execute()->fetchAll();

  dpq($query); // Display the query. 
  dpr($result); // Display the query result.

For displaying query you can use dpq() function and to display print result dpr()

Example

$query = db_select('users','u'); $query->fields('u'); $query->condition('u.uid',1042); $result = $query->execute()->fetchAll();

dpq($query); // For Displaying Query dpr($result); // For Displaying Query results

You can use dpq() to display the query, and dpr() to display the result.

  $query = db_select('users','u');
  $query->fields('u');
  $query->condition('u.uid', 1042);
  $result = $query->execute()->fetchAll();

  dpq($query); // Display the query. 
  dpr($result); // Display the query result.
1
source | link

For displaying query you can use dpq() function and to display print result dpr()

Example

$query = db_select('users','u'); $query->fields('u'); $query->condition('u.uid',1042); $result = $query->execute()->fetchAll();

dpq($query); // For Displaying Query dpr($result); // For Displaying Query results