From 90fec4b8e7e9b3bc2ebb7f35b0bc073cd84f00ee Mon Sep 17 00:00:00 2001 From: Mike Cochrane Date: Tue, 3 Jan 2017 18:13:44 +1300 Subject: [PATCH] Show the query count/query number when using showqueries --- src/ORM/Connect/Database.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ORM/Connect/Database.php b/src/ORM/Connect/Database.php index a82d87e5c..339e21300 100644 --- a/src/ORM/Connect/Database.php +++ b/src/ORM/Connect/Database.php @@ -214,7 +214,8 @@ abstract class Database if (strtolower($_REQUEST['showqueries']) == 'inline') { $sql = DB::inline_parameters($sql, $parameters); } - Debug::message("\n$sql\n{$endtime}s\n", false); + $queryCount = sprintf("%04d", $this->queryCount); + Debug::message("\n$queryCount: $sql\n{$endtime}s\n", false); return $result; } else { return $callback($sql);