mirror of
https://github.com/Outworldz/OpensimEvents.git
synced 2026-08-14 08:52:09 +00:00
46 lines
711 B
Perl
46 lines
711 B
Perl
#!perl
|
|
#
|
|
|
|
use MYSQL;
|
|
|
|
sub GetDB()
|
|
{
|
|
|
|
##########################################
|
|
# Windows Database
|
|
##########################################
|
|
# the ODBC name of the database and the userID and password
|
|
|
|
|
|
my $Handle;
|
|
|
|
if ( open(FILE,"/Inetpub/MySQL.txt"))
|
|
{
|
|
while (<FILE> )
|
|
{
|
|
$sms = $_;
|
|
if ($sms =~ /^DSN/)
|
|
{
|
|
$Handle =new MYSQL($sms);
|
|
|
|
if ($Handle) # Get all setup vars from the above database - Setup Table in the database
|
|
{
|
|
last;
|
|
}
|
|
}
|
|
}
|
|
close FILE;
|
|
|
|
}
|
|
else
|
|
{
|
|
print "NO SQL connection!";
|
|
exit;
|
|
}
|
|
return $Handle;
|
|
|
|
}
|
|
|
|
|
|
1; # required return true command for include files
|