We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 342e27c + 7c5a8b8 commit 02fd080Copy full SHA for 02fd080
src/WebApp/DataModel/LogDAO.php
@@ -28,9 +28,14 @@ public function createTable() {
28
return TRUE;
29
}
30
31
+ public function deleteAll() {
32
+ $sql = 'DELETE FROM '.$this->database->quoteName($this->tableName);
33
+ $this->database->query($sql);
34
+ }
35
+
36
public function housekeeping($days = 30) {
37
$this->threshold = new Date(time()-$days*Date::SECONDS_PER_DAY, WFW_TIMEZONE);
- $sql = 'DELETE * FROM '.$this->database->quoteName($this->tableName).' WHERE log_date < '.$this->database->prepareValue($threshold);
38
+ $sql = 'DELETE FROM '.$this->database->quoteName($this->tableName).' WHERE log_date < '.$this->database->prepareValue($threshold);
39
$this->database->query($sql);
40
41
0 commit comments