Conditions | 5 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function prepared_execute($conn, $sql, $datatypes, $data, $return_stmt = true) { |
||
24 | $stmt = $conn->prepare($sql); |
||
25 | if (!$stmt) { |
||
26 | return false; |
||
27 | } |
||
28 | |||
29 | if ($this->bind_params($stmt, $datatypes, $data) === false) { |
||
30 | return false; |
||
31 | }; |
||
32 | |||
33 | if (!$stmt->execute()) { |
||
34 | return false; |
||
35 | } |
||
36 | |||
37 | if ($return_stmt) { |
||
38 | return $stmt; |
||
39 | } |
||
40 | return true; |
||
41 | } |
||
44 |