| @@ 59-66 (lines=8) @@ | ||
| 56 | return $this->query(); |
|
| 57 | } |
|
| 58 | ||
| 59 | public function update($table, $data) { |
|
| 60 | $this->operation = 'UPDATE'; |
|
| 61 | $this->table = $table; |
|
| 62 | $this->cols = $data; |
|
| 63 | $result = $this->query(); |
|
| 64 | return $result->pdoResult->rowCount(); |
|
| 65 | } |
|
| 66 | ||
| 67 | public function delete($table) { |
|
| 68 | $this->operation = 'DELETE'; |
|
| 69 | $this->table = $table; |
|
| @@ 67-73 (lines=7) @@ | ||
| 64 | return $result->pdoResult->rowCount(); |
|
| 65 | } |
|
| 66 | ||
| 67 | public function delete($table) { |
|
| 68 | $this->operation = 'DELETE'; |
|
| 69 | $this->table = $table; |
|
| 70 | $result = $this->query(); |
|
| 71 | return $result->pdoResult->rowCount(); |
|
| 72 | } |
|
| 73 | ||
| 74 | public function createTable($table_name, $cols, $indexes = []) { |
|
| 75 | $this->operation = 'CREATE TABLE'; |
|
| 76 | $this->table = $table_name; |
|