Skip to topic | Skip to bottom
Home
Main
Main.JeremyCothranCodeSample1r1.1 - 07 Sep 2006 - 19:16 - JeremyCothrantopic end

Start of topic | Skip to actions
use strict;
use DBIx::XML_RDB;

my $db_name = 'db_multi_obs_carolinas_test';
my $db_host = 'xxx.xxx.xxx.xxx';
my $db_user = 'xxx';
my $db_passwd = 'xxx';

my $dbx = DBIx::XML_RDB->new( "dbname=$db_name;host=$db_host", "Pg", "$db_user", "");

#platforms
#$dbx->DoSql(qq{ SELECT short_name FROM organization order by short_name });
#$dbx->DoSql(qq{ SELECT platform_handle,short_name,url FROM platform order by platform_handle });
#$dbx->DoSql(qq{ SELECT type_name FROM platform_type order by type_name });

#observations
#$dbx->DoSql(qq{ select t2.standard_name,t3.standard_name AS uom,t2.definition from m_type t1,obs_type t2,uom_type t3 where t1.obs_type_id = t2.row_id and t1.uom_type_id = t3.row_id order by t2.standard_name });
#$dbx->DoSql(qq{ SELECT standard_name AS uom,definition FROM uom_type order by standard_name });

#open(XML, ">organizations.xml") or die "Could not open file for writing: $! \n";
#open(XML, ">platforms.xml") or die "Could not open file for writing: $! \n";
#open(XML, ">platform_types.xml") or die "Could not open file for writing: $! \n";
#open(XML, ">observation_types.xml") or die "Could not open file for writing: $! \n";
#open(XML, ">uom_types.xml") or die "Could not open file for writing: $! \n";


print XML $dbx->GetData;

close XML or die "Error closing file: $!\n";

exit (0);

-- JeremyCothran - 07 Sep 2006
to top


You are here: Main > JeremyCothranCodeSample1

to top

Copyright © 1999-2009 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DMCC? Send feedback