function hook_views_pre_execute(&$view) { if ($view->name == 'XYZ') { $query = (string)$view->build_info['query']; echo $query; } }
function hook_views_pre_execute(&$view) {
if ($view->name == 'XYZ') {
$query = (string)$view->build_info['query'];
echo $query;
}
}