Skip to main content
added links to the documentation pages
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

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.
Source Link
umesh
  • 1k
  • 8
  • 7

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