|
@@ 111-117 (lines=7) @@
|
| 108 |
|
$table = [ $table ]; |
| 109 |
|
} |
| 110 |
|
|
| 111 |
|
if (!isset($options['prefix_tables']) || ($options['prefix_tables'] === true)) { |
| 112 |
|
array_walk($table, function(&$v, &$k) { |
| 113 |
|
if ((strlen($v) < 7) || (substr($v, 0, 7) != ':table_')) { |
| 114 |
|
$v = ':table_' . $v; |
| 115 |
|
} |
| 116 |
|
}); |
| 117 |
|
} |
| 118 |
|
|
| 119 |
|
if (!is_array($fields)) { |
| 120 |
|
$fields = [ $fields ]; |
|
@@ 234-238 (lines=5) @@
|
| 231 |
|
return false; |
| 232 |
|
} |
| 233 |
|
|
| 234 |
|
if (!isset($options['prefix_tables']) || ($options['prefix_tables'] === true)) { |
| 235 |
|
if ((strlen($table) < 7) || (substr($table, 0, 7) != ':table_')) { |
| 236 |
|
$table = ':table_' . $table; |
| 237 |
|
} |
| 238 |
|
} |
| 239 |
|
|
| 240 |
|
if (isset($where_condition)) { |
| 241 |
|
$statement = 'update ' . $table . ' set '; |
|
@@ 323-327 (lines=5) @@
|
| 320 |
|
|
| 321 |
|
public function delete($table, array $where_condition = [], array $options = null) |
| 322 |
|
{ |
| 323 |
|
if (!isset($options['prefix_tables']) || ($options['prefix_tables'] === true)) { |
| 324 |
|
if ((strlen($table) < 7) || (substr($table, 0, 7) != ':table_')) { |
| 325 |
|
$table = ':table_' . $table; |
| 326 |
|
} |
| 327 |
|
} |
| 328 |
|
|
| 329 |
|
$statement = 'delete from ' . $table; |
| 330 |
|
|