| Conditions | 3 |
| Paths | 10 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 148 | public function find(string $table, string $terms, string $parse) |
||
| 149 | { |
||
| 150 | $this->table = $table; |
||
| 151 | $this->terms = $terms; |
||
| 152 | |||
| 153 | if ($parse) { |
||
| 154 | parse_str($parse, $this->statement); |
||
| 155 | } |
||
| 156 | |||
| 157 | try { |
||
| 158 | $this->read = DB::connect()->prepare("SELECT * FROM {$this->table} {$this->terms}"); |
||
| 159 | $this->read->execute($this->statement); |
||
| 160 | $this->rows = $this->read->rowCount(); |
||
| 161 | return $this->result = $this->read->fetchAll(\PDO::FETCH_OBJ); |
||
| 162 | } catch (\PDOException $e) { |
||
| 163 | echo $e->getMessage() . " in " . $e->getFile(); |
||
| 164 | } |
||
| 165 | |||
| 166 | return $this; |
||
| 167 | } |
||
| 180 | } |