@@ -51,8 +51,9 @@ discard block |
||
| 51 | 51 | $sql = "INSERT INTO {$this->tableName} ({$fields}) VALUES ({$numparams})";
|
| 52 | 52 | if ($debug) { echo $sql; echo "<pre>"; print_r($values); echo "</pre>"; die(); }
|
| 53 | 53 | $result = $this->executeSQL($sql, $values); |
| 54 | - if (empty($result)) |
|
| 55 | - return false; |
|
| 54 | + if (empty($result)) {
|
|
| 55 | + return false; |
|
| 56 | + } |
|
| 56 | 57 | return true; |
| 57 | 58 | } |
| 58 | 59 | |
@@ -66,8 +67,9 @@ discard block |
||
| 66 | 67 | $query = "INSERT INTO $this->tableName"; |
| 67 | 68 | $values = []; |
| 68 | 69 | $dataColumns = array_keys($params); |
| 69 | - if (isset ($dataColumns[0])) |
|
| 70 | - $query .= ' (`' . implode('`, `', $dataColumns) . '`) ';
|
|
| 70 | + if (isset ($dataColumns[0])) {
|
|
| 71 | + $query .= ' (`' . implode('`, `', $dataColumns) . '`) ';
|
|
| 72 | + } |
|
| 71 | 73 | $query .= ' VALUES (';
|
| 72 | 74 | |
| 73 | 75 | foreach ($dataColumns as $index => $column) {
|
@@ -78,8 +80,9 @@ discard block |
||
| 78 | 80 | $query .= ')'; |
| 79 | 81 | |
| 80 | 82 | $result = $this->executeSQL($query, $values); |
| 81 | - if (empty($result)) |
|
| 82 | - return false; |
|
| 83 | + if (empty($result)) {
|
|
| 84 | + return false; |
|
| 85 | + } |
|
| 83 | 86 | return true; |
| 84 | 87 | } else {
|
| 85 | 88 | return false; |
@@ -104,8 +107,9 @@ discard block |
||
| 104 | 107 | if (isset($where)) { $sql .= " WHERE $where"; }
|
| 105 | 108 | if ($debug) { echo $sql; echo "<pre>"; print_r($values); echo "</pre>"; die(); }
|
| 106 | 109 | $result = $this->executeSQL($sql, $values); |
| 107 | - if (empty($result)) |
|
| 108 | - return false; |
|
| 110 | + if (empty($result)) {
|
|
| 111 | + return false; |
|
| 112 | + } |
|
| 109 | 113 | return true; |
| 110 | 114 | } |
| 111 | 115 | |
@@ -126,12 +130,14 @@ discard block |
||
| 126 | 130 | } |
| 127 | 131 | $query = rtrim($query, ", "); |
| 128 | 132 | |
| 129 | - if (!empty($where)) |
|
| 130 | - $query .= " WHERE {$where}";
|
|
| 133 | + if (!empty($where)) {
|
|
| 134 | + $query .= " WHERE {$where}";
|
|
| 135 | + } |
|
| 131 | 136 | |
| 132 | 137 | $result = $this->executeSQL($query, $values); |
| 133 | - if (empty($result)) |
|
| 134 | - return false; |
|
| 138 | + if (empty($result)) {
|
|
| 139 | + return false; |
|
| 140 | + } |
|
| 135 | 141 | return true; |
| 136 | 142 | } else {
|
| 137 | 143 | return false; |
@@ -150,8 +156,9 @@ discard block |
||
| 150 | 156 | if (!empty($where)) { $sql .= " WHERE $where"; }
|
| 151 | 157 | if ($debug) { echo $sql; echo "<pre>"; print_r($values); echo "</pre>"; die(); }
|
| 152 | 158 | $result = $this->executeSQL($sql, $values); |
| 153 | - if (empty($result)) |
|
| 154 | - return false; |
|
| 159 | + if (empty($result)) {
|
|
| 160 | + return false; |
|
| 161 | + } |
|
| 155 | 162 | return true; |
| 156 | 163 | } |
| 157 | 164 | |