Skip to content

Instantly share code, notes, and snippets.

@robballou
Last active December 19, 2015 00:49
Show Gist options
  • Save robballou/5871098 to your computer and use it in GitHub Desktop.
Save robballou/5871098 to your computer and use it in GitHub Desktop.
Use dpq() in Drupal to write the SQL query to a file.
<?php
$query = db_select('node', 'n');
$string = dpq($query, TRUE);
dd($string);
@kid-icarus
Copy link

You win this round.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment