| Conditions | 4 |
| Paths | 7 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | private function executeStatement($query = "" , $params = []) |
||
| 56 | { |
||
| 57 | try { |
||
| 58 | $stmt = $this->connection->prepare( $query ); |
||
| 59 | |||
| 60 | if($stmt === false) { |
||
| 61 | throw New Exception("Unable to do prepared statement: " . $query); |
||
| 62 | } |
||
| 63 | |||
| 64 | if( $params ) { |
||
| 65 | $stmt->bind_param($params[0], $params[1]); |
||
| 66 | } |
||
| 67 | |||
| 68 | $stmt->execute(); |
||
| 69 | |||
| 70 | return $stmt; |
||
| 71 | } catch(Exception $e) { |
||
| 72 | throw New Exception( $e->getMessage() ); |
||
| 73 | } |
||
| 75 | } |