mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-06-25 11:57:42 +02:00
add optional query log
This commit is contained in:
parent
afba49c39a
commit
0c543d46b3
4
db.php
4
db.php
|
@ -52,6 +52,10 @@ function db_escape_string($s, $strip_tags = true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function db_query($link, $query, $die_on_error = 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") {
|
if (DB_TYPE == "pgsql") {
|
||||||
$result = pg_query($link, $query);
|
$result = pg_query($link, $query);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user