From 8c8b305892f3bc66b062a4fd6b46ec37278f0769 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 23 Dec 2001 21:47:02 +0000 Subject: - Added "query log" functionality to Drupal. Inspired by weitzman's code/patch. --- includes/common.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'includes/common.inc') diff --git a/includes/common.inc b/includes/common.inc index 86a7ae9f7..3e5d6f936 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -422,7 +422,14 @@ function timer_print() { global $timer; $stop = explode(" ", microtime()); $diff = $stop[0] - $timer[0]; - print "
execution time: $diff ms
"; + print "
execution time: $diff ms
"; +} + +function query_print() { + global $queries; + print "
";
+  print_r($queries);
+  print "
"; } function page_header() { @@ -443,6 +450,10 @@ function page_footer() { timer_print(); } + if (variable_get("dev_query", 0)) { + query_print(); + } + if (variable_get("cache", 0)) { cache_set(); } -- cgit v1.2.3