diff options
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/DBObject.pm | 5 | ||||
-rw-r--r-- | LedgerSMB/DBObject/Admin.pm | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/LedgerSMB/DBObject.pm b/LedgerSMB/DBObject.pm index 13e31230..097b85dc 100644 --- a/LedgerSMB/DBObject.pm +++ b/LedgerSMB/DBObject.pm @@ -27,6 +27,11 @@ this way as is any information that is needed. copies @attrs from $hashref to $self. +=item set (@attrs) + +Copies the given key=>vars to $self. Allows for finer control of +merging hashes into self. + =back =head1 Copyright (C) 2007, The LedgerSMB core team. diff --git a/LedgerSMB/DBObject/Admin.pm b/LedgerSMB/DBObject/Admin.pm index bccbb16d..74ee238b 100644 --- a/LedgerSMB/DBObject/Admin.pm +++ b/LedgerSMB/DBObject/Admin.pm @@ -181,4 +181,16 @@ sub delete_group { } } +sub get_salutations { + + my $self = shift; + + my $sth = $self->{dbh}->prepare("SELECT * FROM salutation ORDER BY id ASC"); + + $sth->execute(); + + # Returns a list of hashrefs + return $sth->fetchall_arrayref( {} ); +} + 1;
\ No newline at end of file |