@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | throw new DBException('Connect error'); |
44 | 44 | } |
45 | 45 | if (isset($this->connection['opts']['search_path'])) { |
46 | - @\pg_query($this->lnk, "SET search_path TO " . pg_escape_string($this->connection['opts']['search_path'])); |
|
46 | + @\pg_query($this->lnk, "SET search_path TO ".pg_escape_string($this->connection['opts']['search_path'])); |
|
47 | 47 | } |
48 | 48 | if (!isset($this->connection['opts']['search_path']) && isset($this->connection['opts']['schema'])) { |
49 | - @\pg_query($this->lnk, "SET search_path TO " . pg_escape_string($this->connection['opts']['schema'])); |
|
49 | + @\pg_query($this->lnk, "SET search_path TO ".pg_escape_string($this->connection['opts']['schema'])); |
|
50 | 50 | } |
51 | 51 | if (isset($this->connection['opts']['timezone'])) { |
52 | 52 | @\pg_query($this->lnk, "SET TIME ZONE '".pg_escape_string($this->connection['opts']['timezone'])."'"); |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | $res = \pg_query($this->lnk, $sql); |
85 | 85 | if ($log) { |
86 | 86 | $tm = microtime(true) - $tm; |
87 | - if ($tm >= (float)$this->option('log_slow', 0)) { |
|
87 | + if ($tm >= (float) $this->option('log_slow', 0)) { |
|
88 | 88 | @file_put_contents( |
89 | 89 | $log, |
90 | - '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" . |
|
91 | - $sql . "\r\n" . |
|
90 | + '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n". |
|
91 | + $sql."\r\n". |
|
92 | 92 | "\r\n", |
93 | 93 | FILE_APPEND |
94 | 94 | ); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $this->query("ALTER SESSION SET time_zone = '".addslashes($timezone)."'"); |
45 | 45 | } |
46 | 46 | if ($schema = $this->option('schema')) { |
47 | - $this->query("ALTER SESSION SET CURRENT_SCHEMA = " . $schema); |
|
47 | + $this->query("ALTER SESSION SET CURRENT_SCHEMA = ".$schema); |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | } |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | ); |
82 | 82 | if ($log) { |
83 | 83 | $tm = microtime(true) - $tm; |
84 | - if ($tm >= (float)$this->option('log_slow', 0)) { |
|
84 | + if ($tm >= (float) $this->option('log_slow', 0)) { |
|
85 | 85 | @file_put_contents( |
86 | 86 | $log, |
87 | - '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" . |
|
88 | - $sql . "\r\n" . |
|
87 | + '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n". |
|
88 | + $sql."\r\n". |
|
89 | 89 | "\r\n", |
90 | 90 | FILE_APPEND |
91 | 91 | ); |