projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e804d76
)
Prune.php
author
Alan Knowles
<alan@roojs.com>
Wed, 9 Dec 2015 09:27:12 +0000
(17:27 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 9 Dec 2015 09:27:12 +0000
(17:27 +0800)
Prune.php
patch
|
blob
|
history
diff --git
a/Prune.php
b/Prune.php
index
c4642f6
..
9414f36
100644
(file)
--- a/
Prune.php
+++ b/
Prune.php
@@
-79,12
+79,14
@@
class Pman_Core_Prune extends Pman
$f->limit(1000);
$ar = $f->fetchAll();
foreach($ar as $f) {
- $
f
= DB_DataObject::Factory('Events');
- $
f
->query("DELETE FROM Events where
+ $
q
= DB_DataObject::Factory('Events');
+ $
q
->query("DELETE FROM Events where
action = 'NOTIFY'
AND
on_id = {$f->on_id}
AND
+ on_table = '{$q->escape($f->on_table)}'
+ AND
id > {$f->min_id} AND id < {$f->max_id}
");
}