devel_query_table($queries, $counts)Adds a table at the bottom of the page cataloguing data on all the database queries that were made to generate the page.
sites/all/modules/devel/devel.module, line 1532
<?php
function devel_query_table($queries, $counts) {
$version = devel_get_core_version(VERSION);
$header = array ('ms', '#', 'where', 'query', 'target');
$i = 0;
$api = variable_get('devel_api_url', 'api.drupal.org');
foreach ($queries as $query) {
$function = $query['caller']['function'];
$count = isset($counts[$query['query']]) ? $counts[$query['query']] : 0;
$diff = round($query['time'] * 1000, 2);
if ($diff > variable_get('devel_execution', 5)) {
$cell[$i][] = array ('data' => $diff, 'class' => 'marker');
}
else {
$cell[$i][] = $diff;
}
if ($count > 1) {
$cell[$i][] = array ('data' => $count, 'class' => 'marker');
}
else {
$cell[$i][] = $count;
}
$cell[$i][] = l($function, "http://$api/api/$version/function/$function");
$cell[$i][] = check_plain($query['query']);
$cell[$i][] = $query['target'];
$i++;
unset($diff, $count);
}
if (variable_get('devel_query_sort', DEVEL_QUERY_SORT_BY_SOURCE)) {
usort($cell, '_devel_table_sort');
}
return theme('devel_querylog', $header, $cell);
}
?>