Commit 9552b898 authored by Leigh Stoller's avatar Leigh Stoller

Add UpdateVersionInfo() function.

parent bb4097df
......@@ -14,7 +14,7 @@ use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter SelfLoader);
@EXPORT = qw(TBDB_CHECKDBSLOT_NOFLAGS TBDB_CHECKDBSLOT_WARN
TBDB_CHECKDBSLOT_ERROR TBcheck_dbslot TBFieldErrorString
TBGetUniqueIndex ParRun VersionInfo);
TBGetUniqueIndex ParRun VersionInfo UpdateVersionInfo);
use emdb;
use English;
......@@ -479,6 +479,21 @@ sub VersionInfo($)
return $value;
}
#
# Version Info
#
sub UpdateVersionInfo($$)
{
my ($name, $value) = @_;
my $safe_name = DBQuoteSpecial($name);
my $safe_value = DBQuoteSpecial($value);
return -1
if (!DBQueryWarn("replace into version_info set ".
" name=$safe_name, value=$safe_value"));
return 0;
}
#
# Run a command, being sure to capture all output.
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment