diff options
author | Andrew Dolgov <[email protected]> | 2011-11-11 12:26:54 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-11-11 12:26:54 +0400 |
commit | 0c543d46b34fc1542d37cd4b44b70d848eab0a27 (patch) | |
tree | 666e7b4e76627df74a45af2e8de62a3a85ffaf9c /db.php | |
parent | afba49c39a737ddbf140d84af783bb642d71cea5 (diff) |
add optional query log
Diffstat (limited to 'db.php')
-rw-r--r-- | db.php | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -52,6 +52,10 @@ function db_escape_string($s, $strip_tags = true) { } function db_query($link, $query, $die_on_error = true) { + if ($_REQUEST["qlog"]) + error_log($_SESSION["uid"] . ":" . $_REQUEST["op"] . "/" . $_REQUEST["subop"] . + " $query\n", 3, "/tmp/ttrss-query.log"); + if (DB_TYPE == "pgsql") { $result = pg_query($link, $query); if (!$result) { |