mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Prevent identical entries
This commit is contained in:
@@ -133,7 +133,20 @@ class zeitaufzeichnung extends basis_db
|
|||||||
//Variablen pruefen
|
//Variablen pruefen
|
||||||
if(!$this->validate())
|
if(!$this->validate())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
$check_qry = 'SELECT count(*) from campus.tbl_zeitaufzeichnung where uid='.$this->db_add_param($this->uid).' and start = '.$this->db_add_param($this->start).' and ende = '.$this->db_add_param($this->ende);
|
||||||
|
if($this->db_query($check_qry))
|
||||||
|
{
|
||||||
|
if($row = $this->db_fetch_object())
|
||||||
|
{
|
||||||
|
if ($row->count)
|
||||||
|
{
|
||||||
|
$this->errormsg = 'Identischer Eintrag existiert!';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($this->new)
|
if($this->new)
|
||||||
{
|
{
|
||||||
//Neuen Datensatz einfuegen
|
//Neuen Datensatz einfuegen
|
||||||
|
|||||||
Reference in New Issue
Block a user