@@ 134-140 (lines=7) @@ | ||
131 | $table = [ $table ]; |
|
132 | } |
|
133 | ||
134 | if (!isset($options['prefix_tables']) || ($options['prefix_tables'] === true)) { |
|
135 | array_walk($table, function(&$v, &$k) { |
|
136 | if ((strlen($v) < 7) || (substr($v, 0, 7) != ':table_')) { |
|
137 | $v = ':table_' . $v; |
|
138 | } |
|
139 | }); |
|
140 | } |
|
141 | ||
142 | if (!is_array($fields)) { |
|
143 | $fields = [ $fields ]; |
|
@@ 257-261 (lines=5) @@ | ||
254 | return false; |
|
255 | } |
|
256 | ||
257 | if (!isset($options['prefix_tables']) || ($options['prefix_tables'] === true)) { |
|
258 | if ((strlen($table) < 7) || (substr($table, 0, 7) != ':table_')) { |
|
259 | $table = ':table_' . $table; |
|
260 | } |
|
261 | } |
|
262 | ||
263 | if (isset($where_condition)) { |
|
264 | $statement = 'update ' . $table . ' set '; |
|
@@ 346-350 (lines=5) @@ | ||
343 | ||
344 | public function delete($table, array $where_condition = [], array $options = null) |
|
345 | { |
|
346 | if (!isset($options['prefix_tables']) || ($options['prefix_tables'] === true)) { |
|
347 | if ((strlen($table) < 7) || (substr($table, 0, 7) != ':table_')) { |
|
348 | $table = ':table_' . $table; |
|
349 | } |
|
350 | } |
|
351 | ||
352 | $statement = 'delete from ' . $table; |
|
353 |