mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 06:22:18 +00:00
add functions to delete entries
This commit is contained in:
@@ -11,4 +11,14 @@ class Zeitaufzeichnung_model extends DB_Model
|
||||
$this->dbTable = 'campus.tbl_zeitaufzeichnung';
|
||||
$this->pk = 'zeitaufzeichnung_id';
|
||||
}
|
||||
|
||||
public function deleteEntriesForCurrentDay()
|
||||
{
|
||||
$today = date('Y-m-d');
|
||||
$qry = "DELETE FROM " . $this->dbTable . "
|
||||
WHERE start >= '" . $today . " 00:00:00'
|
||||
AND start <= '" . $today . " 23:59:59';";
|
||||
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,13 @@ class Zeitsperre_model extends DB_Model
|
||||
$this->dbTable = 'campus.tbl_zeitsperre';
|
||||
$this->pk = 'zeitsperre_id';
|
||||
}
|
||||
|
||||
public function deleteEntriesForCurrentDay()
|
||||
{
|
||||
$today = date('Y-m-d');
|
||||
$qry = "DELETE FROM " . $this->dbTable . "
|
||||
WHERE vondatum = '" . $today . "';";
|
||||
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user