Revision 57528e5b
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/User.pm | ||
---|---|---|
614 | 614 |
($can_delete) = selectrow_query($form, $dbh, qq|SELECT tag FROM schema_info WHERE tag = ?|, 'employee_deleted') if $good_db; |
615 | 615 |
|
616 | 616 |
if (!$id) { |
617 |
my $query = qq|INSERT INTO employee (login, name, workphone, role) VALUES (?, ?, ?, ?)|;
|
|
618 |
do_query($form, $dbh, $query, ($self->{login}, $myconfig->{name}, $myconfig->{tel}, "user"));
|
|
617 |
my $query = qq|INSERT INTO employee (login, name, workphone) VALUES (?, ?, ?)|;
|
|
618 |
do_query($form, $dbh, $query, ($self->{login}, $myconfig->{name}, $myconfig->{tel})); |
|
619 | 619 |
|
620 | 620 |
} elsif ($update_existing && $can_delete) { |
621 |
my $query = qq|UPDATE employee SET name = ?, workphone = ?, role = 'user', deleted = 'f' WHERE id = ?|;
|
|
621 |
my $query = qq|UPDATE employee SET name = ?, workphone = ?, deleted = 'f' WHERE id = ?|; |
|
622 | 622 |
do_query($form, $dbh, $query, $myconfig->{name}, $myconfig->{tel}, $id); |
623 | 623 |
} |
624 | 624 |
|
Auch abrufbar als: Unified diff
Nicht benutzte Spalte employee.role entfernen