TT#121785 provisioning::voip_subscribers::findby_id finder method

Change-Id: Ic6e377c7b89cdedcc6e94b541f4db37b023b5a56
mr9.5.1
Rene Krenn 4 years ago
parent 72ab33d02b
commit ef52bd86b9

@ -29,6 +29,7 @@ our @EXPORT_OK = qw(
update_row
findby_uuid
findby_id
);
my $tablename = 'voip_subscribers';
@ -89,6 +90,24 @@ sub findby_uuid {
}
sub findby_id {
my ($xa_db,$id,$load_recursive) = @_;
check_table();
my $db = &$get_db();
$xa_db //= $db;
my $table = $db->tableidentifier($tablename);
my $stmt = 'SELECT * FROM ' . $table . ' WHERE ' .
$db->columnidentifier('id') . ' = ?';
my @params = ($id);
my $rows = $xa_db->db_get_all_arrayref($stmt,@params);
return buildrecords_fromrows($rows,$load_recursive)->[0];
}
sub update_row {
my ($xa_db,$data) = @_;

Loading…
Cancel
Save