From d608c770c56ec35092221b296a83dd617d58dae6 Mon Sep 17 00:00:00 2001 From: icewing Date: Wed, 11 Jun 2008 17:00:59 +0000 Subject: Marcus Povey * All queries echoed in debug mode git-svn-id: https://code.elgg.org/elgg/trunk@870 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/database.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/database.php b/engine/lib/database.php index c637b1d24..62fa15877 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -218,7 +218,12 @@ $dblink = get_db_link('write'); - $dbcalls++; + $dbcalls++; + + if ((isset($CONFIG->debug)) && ($CONFIG->debug==true)) + { + error_log("--- DB QUERY --- $query"); + } if (mysql_query("$query", $dblink)) return mysql_insert_id($dblink); @@ -245,7 +250,12 @@ $dblink = get_db_link('write'); - $dbcalls++; + $dbcalls++; + + if ((isset($CONFIG->debug)) && ($CONFIG->debug==true)) + { + error_log("--- DB QUERY --- $query"); + } if (mysql_query("$query", $dblink)) return mysql_affected_rows(); @@ -273,7 +283,12 @@ $dblink = get_db_link('write'); - $dbcalls++; + $dbcalls++; + + if ((isset($CONFIG->debug)) && ($CONFIG->debug==true)) + { + error_log("--- DB QUERY --- $query"); + } if (mysql_query("$query", $dblink)) return mysql_affected_rows(); -- cgit v1.2.3