Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use DBI;
- print "Content-type: text/html; charset=windows-1251\n\n";
- $DB_HOST = ' sakura ';
- $DB_NAME = ' /data/database/plx/plxsys.gdb ';
- $DB_USER = ' sysdba ';
- $DB_PASSWORD = ' masterkey ';
- $dsn = "DBI:InterBase:database=$DB_NAME;host=$DB_HOST";
- $rootGroupId = 1;
- $subnavRootLevel = 2;
- sub openDB {
- $dbh = DBI-> connect ($dsn, $DB_USER, $DB_PASSWORD) or die "Can't connect to $data_source: $DBI:: errstr";
- }
- sub closeDB {
- $dbh-> disconnect ();
- }
- openDB ();
- my $sth = $dbh-> prepare ("SELECT ID FROM PROFILE where TRBAL>'500'");
- $sth-> execute ();
- while (my $ref = $sth-> fetchrow_hashref ()) {
- print (join "\t", ($ref-> {'NAME '};
- $ref-> {'CAPITAL '})). "\n";
- }
- $sth-> finish ();
- closeDB ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement