Conditions | 2 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function delete(string $table, string $terms, string $parseString) |
||
38 | { |
||
39 | $this->table = $table; |
||
40 | $this->terms = $terms; |
||
41 | |||
42 | parse_str($parseString, $this->statements); |
||
43 | |||
44 | $this->delete = "DELETE FROM {$this->table} {$this->terms}"; |
||
45 | |||
46 | try{ |
||
47 | $this->result = DB::connect()->prepare($this->delete); |
||
48 | $this->result->execute($this->statements); |
||
49 | $this->error = true; |
||
50 | |||
51 | }catch (\PDOException $e){ |
||
52 | echo $e->getMessage(); |
||
53 | |||
58 | } |