Add fspgroup repair action to menu
This commit is contained in:
@@ -166,6 +166,18 @@ sub db_do {
|
||||
$db->do(@cmd) or die "Database command failed (@cmd): " . $db->errstr;
|
||||
}
|
||||
|
||||
# db_do only reports affected rows, this one also reads the value back
|
||||
sub db_selectrow {
|
||||
my (@cmd) = @_;
|
||||
|
||||
my $db = db_connect();
|
||||
|
||||
my @row = $db->selectrow_array(@cmd);
|
||||
die "Database query failed (@cmd): " . $db->errstr if $db->err;
|
||||
|
||||
return @row;
|
||||
}
|
||||
|
||||
sub db_create {
|
||||
my ($db_name) = @_;
|
||||
say " - Creating database $db_name...";
|
||||
|
||||
Reference in New Issue
Block a user