| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function getCachedStmt($sql) { |
||
| 12 | $queryId = $this->getQueryId($sql); |
||
| 13 | if (isset($this->queryCache[$queryId])) $stmt = $this->queryCache[$queryId]; |
||
| 14 | else { |
||
| 15 | $stmt = $this->pdo->prepare($sql, [\PDO::ATTR_CURSOR => \PDO::CURSOR_FWDONLY]); |
||
| 16 | if ($stmt) $this->queryCache[$queryId] = $stmt; |
||
| 17 | } |
||
| 18 | return $stmt; |
||
| 19 | } |
||
| 29 |