Created
July 29, 2015 01:03
-
-
Save chriscalip/01bf36150420dfd356d6 to your computer and use it in GitHub Desktop.
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
<?php | |
if (!function_exists('krumo')) { | |
has_krumo(); | |
} | |
$nids = db_query('SELECT nid FROM {node} n')->fetchCol(); | |
$query = db_select('node', 'n'); | |
$query->addTag('ranmgkmg'); | |
$query->fields('n', array('nid')); | |
$query->condition('nid', array(1,2,3,4,5), 'IN'); | |
$results = $query->execute()->fetchCol(); | |
$query_string = (string) $query; | |
$better_query_string = strtr((string) $query, $query->arguments()); | |
krumo(array( | |
$nids, | |
$results, | |
$query_string, | |
$better_query_string | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment