Gossamer Forum
Home : Products : Gossamer Links : Discussions :

how to read database.def and show host infos on the page?

Quote Reply
how to read database.def and show host infos on the page?
  

Hi guys

Recently i had setup a mysqld on router.
so i need to have a reminder on the page shows which mysqld linksql connected with

i found database.def contains host informations


sub {
my $testdb = GT::SQL->new ("R:/defs");
my $abc=$testdb ->{host};
return $abc; }


but it produce nothing. anyone here could give me some clue?
read the database.def file and print it out on the linksql homepage.

Thanks
Quote Reply
Re: [courierb] how to read database.def and show host infos on the page? In reply to
sub {
use GT::Config;
my $Config = GT::Config->load("$CFG->{admin_root_path}/defs/database.def");
my $databasetype = $Config->{'host'}
}