- Timestamp:
- 09/02/11 17:41:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r117 r118 729 729 return $groupname if $groupname; 730 730 } # end groupName 731 732 733 ## DNSDB::groupID() 734 # Return the group ID based on the group name 735 # Takes a database handle and the group name 736 # Returns the group ID or undef on failure 737 sub groupID { 738 $errstr = ''; 739 my $dbh = shift; 740 my $group = shift; 741 my ($grpid) = $dbh->selectrow_array("SELECT group_id FROM groups WHERE group=?", undef, ($group) ); 742 $errstr = $DBI::errstr if !$grpid; 743 return $grpid if $grpid; 744 } # end groupID() 731 745 732 746 … … 872 886 sub updateUser { 873 887 my $dbh = shift; 888 889 ##fixme: tweak calling convention so that we can update any given bit of data 874 890 my $uid = shift; 875 891 my $username = shift;
Note:
See TracChangeset
for help on using the changeset viewer.