Changeset 948
- Timestamp:
- 08/02/24 11:08:31 (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/access-pwd-update.pl
r932 r948 71 71 open HTPASS, "<$passfile"; 72 72 73 my $sth = $ip_dbh->prepare("SELECT count(*) FROM users WHERE username = ?");73 my $sth = $ip_dbh->prepare("SELECT count(*) FROM users WHERE username = ?"); 74 74 my $insert_user = $ip_dbh->prepare("INSERT INTO users (username) VALUES (?)"); 75 my $del_user = $ip_dbh->prepare("DELETE FROM users WHERE username = ?");75 my $del_user = $ip_dbh->prepare("DELETE FROM users WHERE username = ?"); 76 76 77 77 while (<HTPASS>) { … … 82 82 if ($data[0] == 0) { 83 83 if ($doadd) { 84 $insert_user->execute($user) or print "error inserting $user: ".$DBI::errstr."\n";84 $insert_user->execute($user) or print "error inserting $user: $DBI::errstr\n"; 85 85 print "new user: $user\n"; 86 86 } else { … … 102 102 } 103 103 if ($dodel) { 104 $del_user->execute($data[0]) or print "error deleting $data[0]: ".$DBI::errstr."\n";104 $del_user->execute($data[0]) or print "error deleting $data[0]: $DBI::errstr\n"; 105 105 print "deleting $data[0] (acl $data[1])\n"; 106 106 } else {
Note:
See TracChangeset
for help on using the changeset viewer.