mirror of
https://github.com/friendica/friendica
synced 2025-04-24 23:50:20 +00:00
Doing negative caching for config values, special logfile for database optmisations
This commit is contained in:
parent
a5dc41ab13
commit
7f19d39b14
2 changed files with 26 additions and 4 deletions
|
@ -77,14 +77,16 @@ class dba {
|
|||
|
||||
$this->error = '';
|
||||
|
||||
//@file_put_contents("/tmp/friendica-db.log", datetime_convert().':'.session_id(). ' Start '.$sql."\n", FILE_APPEND);
|
||||
if (get_config("system", "db_log") != "")
|
||||
@file_put_contents(get_config("system", "db_log"), datetime_convert().':'.session_id(). ' Start '.$sql."\n", FILE_APPEND);
|
||||
|
||||
if($this->mysqli)
|
||||
$result = @$this->db->query($sql);
|
||||
else
|
||||
$result = @mysql_query($sql,$this->db);
|
||||
|
||||
//@file_put_contents("/tmp/friendica-db.log", datetime_convert().':'.session_id(). ' Stop '."\n", FILE_APPEND);
|
||||
if (get_config("system", "db_log") != "")
|
||||
@file_put_contents(get_config("system", "db_log"), datetime_convert().':'.session_id(). ' Stop '."\n", FILE_APPEND);
|
||||
|
||||
if($this->mysqli) {
|
||||
if($this->db->errno)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue