@@ -58,7 +58,7 @@ |
||
| 58 | 58 | } |
| 59 | 59 | public function next() |
| 60 | 60 | { |
| 61 | - $this->fetched ++; |
|
| 61 | + $this->fetched++; |
|
| 62 | 62 | $this->last = $this->result->fetch_assoc(); |
| 63 | 63 | } |
| 64 | 64 | public function valid() |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | if ($this->lnk === null) { |
| 39 | 39 | $this->lnk = new \mysqli( |
| 40 | - (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : '') . |
|
| 40 | + (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : ''). |
|
| 41 | 41 | $this->connection['host'], |
| 42 | 42 | $this->connection['user'], |
| 43 | 43 | $this->connection['pass'], |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | $res = $this->lnk->query($sql); |
| 98 | 98 | if ($log) { |
| 99 | 99 | $tm = microtime(true) - $tm; |
| 100 | - if ($tm >= (float)$this->option('log_slow', 0)) { |
|
| 100 | + if ($tm >= (float) $this->option('log_slow', 0)) { |
|
| 101 | 101 | @file_put_contents( |
| 102 | 102 | $log, |
| 103 | - '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" . |
|
| 104 | - $sql . "\r\n" . |
|
| 103 | + '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n". |
|
| 104 | + $sql."\r\n". |
|
| 105 | 105 | "\r\n", |
| 106 | 106 | FILE_APPEND |
| 107 | 107 | ); |
@@ -40,23 +40,23 @@ |
||
| 40 | 40 | break; |
| 41 | 41 | case 'array': |
| 42 | 42 | $par = implode(',', $par); |
| 43 | - $par = "'" . $this->lnk->escape_string($par) . "'"; |
|
| 43 | + $par = "'".$this->lnk->escape_string($par)."'"; |
|
| 44 | 44 | break; |
| 45 | 45 | case 'object': |
| 46 | 46 | $par = serialize($par); |
| 47 | - $par = "'" . $this->lnk->escape_string($par) . "'"; |
|
| 47 | + $par = "'".$this->lnk->escape_string($par)."'"; |
|
| 48 | 48 | break; |
| 49 | 49 | case 'resource': |
| 50 | 50 | if (is_resource($v) && get_resource_type($v) === 'stream') { |
| 51 | 51 | $par = stream_get_contents($par); |
| 52 | - $par = "'" . $this->lnk->escape_string($par) . "'"; |
|
| 52 | + $par = "'".$this->lnk->escape_string($par)."'"; |
|
| 53 | 53 | } else { |
| 54 | 54 | $par = serialize($par); |
| 55 | - $par = "'" . $this->lnk->escape_string($par) . "'"; |
|
| 55 | + $par = "'".$this->lnk->escape_string($par)."'"; |
|
| 56 | 56 | } |
| 57 | 57 | break; |
| 58 | 58 | default: |
| 59 | - $par = "'" . $this->lnk->escape_string((string)$par) . "'"; |
|
| 59 | + $par = "'".$this->lnk->escape_string((string) $par)."'"; |
|
| 60 | 60 | break; |
| 61 | 61 | } |
| 62 | 62 | $sql .= $par; |