diff options
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class index 41054c7..0af1273 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -892,7 +892,9 @@ function delete($query = null) */ function delete_untouched($query = null, $p = []) { - if (count((array)$this->_touchedids) < $p['mintouched']) + if (isset($query['mintouched'])) + it::error('bad usage'); + else if (count((array)$this->_touchedids) < $p['mintouched']) it::error((array)$p['it_error'] + ['title' => "skipping delete, only " . count((array)$this->_touchedids) . " records were touched"]); else if ($this->select(['SELECT' => $this->escape_name($this->_p['keyfield'])] + (array)$query)) while ($this->iterate()) |