Cover V12, I08

Article
Figure 1
Figure 2
Listing 1
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9
Listing 10

aug2003.tar

Listing 7 User listing section of reporting script

    # Connect to the database
    $dbh=DBI->connect( "DBI:Pg:dbname=$dbName;
host=$dbHost", $dbUser, $dbPassword )
        || die "Unable to connect: $DBI::errstr\n";

    # Populate the username list from the database
    $query_ref=$dbh->selectcol_arrayref("select DISTINCT username from traffic")
        || die "Failed database lookup: $DBI::errstr\n";
    @userlist=@$query_ref;

    # Add "---Everyone---" to the top of the user list
    unshift @userlist, '---Everyone---'