|
@@ 184-186 (lines=3) @@
|
| 181 |
|
// limits |
| 182 |
|
// |
| 183 |
|
$limit = null; |
| 184 |
|
if ($this->limit > 0) { |
| 185 |
|
$limit = ' limit '.($this->limit_offset != -1 ? $this->limit_offset.', ' : null).$this->limit; |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
// |
| 189 |
|
// group bys |
|
@@ 249-251 (lines=3) @@
|
| 246 |
|
} |
| 247 |
|
$update_fields = implode(', ', $updates); |
| 248 |
|
$limit = null; |
| 249 |
|
if ($this->limit > 0) { |
| 250 |
|
$limit = ' limit '.($this->limit_offset != -1 ? $this->limit_offset.', ' : null).$this->limit; |
| 251 |
|
} |
| 252 |
|
$where = count($this->_conditions) > 0 ? (' where '.implode(' and ', $this->_conditions)) : null; |
| 253 |
|
$string = sprintf('update %1$s set %2$s %3$s %4$s', $this->_table_names[0], $update_fields, $where, $limit); |
| 254 |
|
|
|
@@ 291-293 (lines=3) @@
|
| 288 |
|
$table = $this->_table_names[0]; |
| 289 |
|
$where = count($this->_conditions) > 0 ? (' where '.implode(' and ', $this->_conditions)) : null; |
| 290 |
|
$limit = null; |
| 291 |
|
if ($this->limit > 0) { |
| 292 |
|
$limit = ' limit '.($this->limit_offset != -1 ? $this->limit_offset.', ' : null).$this->limit; |
| 293 |
|
} |
| 294 |
|
$string = sprintf('delete from %1$s %2$s %3$s', $table, $where, $limit); |
| 295 |
|
|
| 296 |
|
return $string; |