diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-11 17:00:59 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-11 17:00:59 +0000 |
commit | d608c770c56ec35092221b296a83dd617d58dae6 (patch) | |
tree | 93e4a9a47b28c84cbabe6f95b506381ae210239b /engine/lib | |
parent | fcf7f413a82c831a438d2a46f3579907bf4ff0d6 (diff) | |
download | elgg-d608c770c56ec35092221b296a83dd617d58dae6.tar.gz elgg-d608c770c56ec35092221b296a83dd617d58dae6.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* All queries echoed in debug mode
git-svn-id: https://code.elgg.org/elgg/trunk@870 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/database.php | 21 |
1 files changed, 18 insertions, 3 deletions
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();
|