Created
November 12, 2012 03:31
-
-
Save CrookedNumber/4057335 to your computer and use it in GitHub Desktop.
Find actual drupal queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From http://www.opensourcery.com/blog/jessehs/what-was-query | |
// Devel Configuration -- Add this to | |
$conf['dev_query'] = TRUE; | |
<?php | |
global $queries; | |
$query = array_pop($queries); | |
dd($query, 'descriptive text about the query being printed out -- this one is logged to /tmp/drupal_debug.txt'); | |
dpm($query, 'descriptive text about the query being printed out -- this one is printed to the screen'); | |
?> | |
// Also: debug(strtr($query, $query->getArguments())); will show a query with arguments replaced in. It won't be quoted so it's not perfect but it integrates with the testing framework and doesn't require devel. (from CHX) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment