Conditions | 3 |
Paths | 8 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
105 | public function find(string $table, string $terms, string $parse) |
||
106 | { |
||
107 | $this->table = $table; |
||
108 | $this->terms = $terms; |
||
109 | |||
110 | if ($parse) { |
||
111 | parse_str($parse, $this->statement); |
||
112 | } |
||
113 | |||
114 | try { |
||
115 | $this->read = DB::connect()->prepare("SELECT * FROM {$this->table} {$this->terms}"); |
||
116 | $this->read->execute($this->statement); |
||
117 | return $this->result = $this->read->fetchAll(\PDO::FETCH_OBJ); |
||
118 | } catch (\PDOException $e) { |
||
119 | echo $e->getMessage() . " in " . $e->getFile(); |
||
120 | } |
||
129 | } |