You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface/lib/classes/tform.inc.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -107,6 +107,7 @@ class tform {
107
107
var $formDef;
108
108
var $wordbook;
109
109
var $module;
110
+
var $primary_id;
110
111
111
112
/**
112
113
* Laden der Tabellendefinition
@@ -535,14 +536,15 @@ function validateField($field_name, $field_value, $validators) {
535
536
}
536
537
break;
537
538
case'UNIQUE':
538
-
$num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ".$escape.$this->formDef['db_table'].$escape. " WHERE $field_name = '".$app->db->quote($field_value)."'");
539
539
if($this->action == 'NEW') {
540
+
$num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ".$escape.$this->formDef['db_table'].$escape. " WHERE $field_name = '".$app->db->quote($field_value)."'");
$num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ".$escape.$this->formDef['db_table'].$escape. " WHERE $field_name = '".$app->db->quote($field_value)."' AND ".$this->formDef['db_table_idx']." != ".$this->primary_id);
0 commit comments